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

Option 'linefeed' is ignored in 'compressed' style #2743

Open
Hint-ru opened this issue Nov 19, 2018 · 5 comments
Open

Option 'linefeed' is ignored in 'compressed' style #2743

Hint-ru opened this issue Nov 19, 2018 · 5 comments

Comments

@Hint-ru
Copy link

Hint-ru commented Nov 19, 2018

Option 'linefeed' is ignored in 'compressed' style (at least on Windows).

--output-style compressed --linefeed lf
Result: CR LF

--linefeed lf
Result: LF

This is very annoying when working with git.

version info:
node-sass 4.11.0 (Wrapper) [JavaScript]
libsass 3.5.4 (Sass Compiler) [C/C++]

@nschonni
Copy link
Collaborator

nschonni commented Nov 19, 2018

@Hint-ru can you file an issue with libsass since it's compilation related, it wouldn't be something that can be fixed in this repo.

PS: generally for line endings with source control it's better to deal with them using gitattributes or git config https://help.github.com/articles/dealing-with-line-endings/

@xzyfer
Copy link
Contributor

xzyfer commented Nov 20, 2018

@nschonni this is libsass :)

@mgreter
Copy link
Contributor

mgreter commented Dec 13, 2018

Just checked this and libsass returns the correct line-feeds in the resulting css if the option is passed correctly. So this seems to be an issue with node-sass. @xzyfer can you transfer this issue?

@Hint-ru
Copy link
Author

Hint-ru commented Dec 13, 2018

Sorry, inaccurate bug report. It looks like problem in comments, which are copied as is (with original linefeed). But the final linefeed in the end of the file is valid (parameter dependent).

@mgreter
Copy link
Contributor

mgreter commented Dec 14, 2018

OK, I see, AFAICT comments and other AST nodes do preserve the input 1 to 1, so this seems valid. Although this is very lowest priority to fix from our standpoint, since it doesn't change the semantics. I would really suggest to use a .gitattributes file to solve your immediate problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants