Libsass: 在“压缩”样式中忽略选项“换行”

创建于 2018-11-19  ·  5评论  ·  资料来源: sass/libsass

选项 'linefeed' 在 'compressed' 样式中被忽略(至少在 Windows 上)。

--output-style compressed --linefeed lf
结果:CR LF

--linefeed lf
结果:LF

这在使用 git 时非常烦人。

版本信息:
node-sass 4.11.0(包装器)[JavaScript]
libsass 3.5.4 (Sass 编译器) [C/C++]

Bug - Whitespace

最有用的评论

@nschonni这是 libsass :)

所有5条评论

@Hint-ru 你能不能用 libsass 提交一个问题,因为它与编译相关,它不能在这个 repo 中修复。

PS:通常对于带有源代码控制的行结尾,最好使用 gitattributes 或 git config https://help.github.com/articles/dealing-with-line-endings/处理它们

@nschonni这是 libsass :)

刚刚检查了这个,如果选项正确传递,libsass 在结果 css 中返回正确的换行符。 所以这似乎是 node-sass 的问题。 @xzyfer你能转移这个问题吗?

抱歉,错误报告不准确。 它看起来像注释中的问题,按原样复制(使用原始换行符)。 但是文件末尾的最后一个换行符是有效的(取决于参数)。

好的,我明白了,AFAICT 注释和其他 AST 节点确实保留了 1 到 1 的输入,所以这似乎是有效的。 尽管从我们的角度来看,这是修复的最低优先级,因为它不会改变语义。 我真的建议使用.gitattributes文件来解决您的直接问题!

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

xzyfer picture xzyfer  ·  7评论

luiscla27 picture luiscla27  ·  10评论

nex3 picture nex3  ·  9评论

bertusgroenewegen picture bertusgroenewegen  ·  6评论

schneems picture schneems  ·  9评论