Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect line numbers for errors outside blocks #3147

Open
GCorbel opened this issue Mar 15, 2021 · 0 comments
Open

Incorrect line numbers for errors outside blocks #3147

GCorbel opened this issue Mar 15, 2021 · 0 comments

Comments

@GCorbel
Copy link

GCorbel commented Mar 15, 2021

When an error is made outside a block, the line number in the error is incorrect.

input.scss

.my-class {
  text-align: left;
  color: red;
}
.something-wrong-at-line-5 }

Actual results

The error is marked on line 4.
libsass 3.6.4

Error: Invalid CSS after "}": expected 1 selector or at-rule, was ".something-wrong-at"
        on line 4:2 of ../../../tmp/test.scss
>> }

   -^

Expected result

The error is correctly set on line 4 with Ruby Sass.
ruby sass 3.7.4

Error: Invalid CSS after "...rong-at-line-5 ": expected "{", was "}"
        on line 5 of /tmp/test.scss

The error is correctly set on line 4 with Dart Sass.
dart-sass 1.32.8 compiled with dart2js 2.10.5
version info:

Error: expected "{".
  ╷
5 │ .something-wrong-at-line-5 }
  │                            ^
  ╵
  /tmp/test.scss 5:28  root stylesheet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant