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++]
@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/
@nschonni this is libsass :)
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?
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).
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!
Most helpful comment
@nschonni this is libsass :)