开发者

For HAML, need to use strict nesting level EVEN INSIDE COMMENTS?

Such as the following HAML 开发者_如何学Ccode for comments:

/ 
  We don't want to use

    foobar(something, something_else, ...)

  here

it will fail because HAML wants the indent level to be 2 spaces, and the foobar line is indented 4 spaces... come on... strict indentation... even in comments? Isn't this a bug? (or a reasonable feature?)


Try using the :plain plaintext filter, documented 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

Which outputs this for me:

>haml --version
Haml/Sass 3.0.25 (Classy Cassidy)

>haml test.haml
<!--
  We don't want to use

    foobar(something, something_else, ...)

  here
-->
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜