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

Pass "keep comments" flag to improve error message line numbers #866

Merged
merged 1 commit into from
Mar 5, 2015
Merged

Pass "keep comments" flag to improve error message line numbers #866

merged 1 commit into from
Mar 5, 2015

Conversation

anlutro
Copy link
Contributor

@anlutro anlutro commented Jan 30, 2015

Currently, if I have a Sass file with invalid syntax and comments, the line numbers are off because the sass2scss process doesn't preserve comments. This is fixed by changing the options bit int passed to the sass2scss function.

Hopefully I got the bit flag right, I don't work with this sort of thing on a regular basis!

Before:

$ cat -n ../test.sass 
     1  // some comment
     2  ;
$ ./sassc/bin/sassc ../test.sass 
/home/andreas/dev/test.sass:1: invalid top-level expression

After:

$ ./sassc/bin/sassc ../test.sass 
/home/andreas/dev/test.sass:2: invalid top-level expression

@mgreter
Copy link
Contributor

mgreter commented Feb 1, 2015

It actually should be a | instead of a +

SASS2SCSS_PRETTIFY_1 | SASS2SCSS_KEEP_COMMENT

Other than that I guess we would merge it in!

@anlutro
Copy link
Contributor Author

anlutro commented Feb 1, 2015

Fixed, thanks.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 76.09% when pulling 917d509 on alprs:fix_comments-stacktrace into 4d5ea59 on sass:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 76.43% when pulling 7ce1e5c on alprs:fix_comments-stacktrace into 1f40bf4 on sass:master.

@anlutro
Copy link
Contributor Author

anlutro commented Feb 21, 2015

Anything blocking this?

@xzyfer
Copy link
Contributor

xzyfer commented Feb 21, 2015

Thanks for you work!

This is @mgreter's area and he is currently busy with #899

We'll make sure this makes it into the next release.

@anlutro
Copy link
Contributor Author

anlutro commented Feb 22, 2015

Ah, I see. I've been compiling all the time so releases aren't a huge deal
to me personally - I'll just keep rebasing against master until then, I was
just curious.

On Sun, 22 Feb 2015 00:56 Michael Mifsud [email protected] wrote:

Thanks for you work!

This is @mgreter https://github.com/mgreter's area and he is currently
busy with #899 #899

We'll make sure this makes it into the next release.


Reply to this email directly or view it on GitHub
#866 (comment).

@am11
Copy link
Contributor

am11 commented Mar 4, 2015

👍

mgreter added a commit that referenced this pull request Mar 5, 2015
Pass "keep comments" flag to improve error message line numbers
@mgreter mgreter merged commit 6ad2954 into sass:master Mar 5, 2015
@mgreter mgreter added this to the 3.2 milestone Mar 11, 2015
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

Successfully merging this pull request may close these issues.

5 participants