如下面的HAML评论代码:
/
We don't want to use
foobar(something, something_else, ...)
here
它会失败,因为HAML希望缩进级别为2个空格,而foobar
行缩进4个空格...加上...严格缩进...即使在注释中?这不是一个错误吗? (或一个合理的功能?)
答案 0 :(得分:2)
尝试使用:plain
明文过滤器,记录here。
/
:plain
We don't want to use
foobar(something, something_else, ...)
here
-# this is a comment
going to a second line
indented extra on the third line
and normally on the fourth
哪个为我输出:
>haml --version
Haml/Sass 3.0.25 (Classy Cassidy)
>haml test.haml
<!--
We don't want to use
foobar(something, something_else, ...)
here
-->