Haml';嵌套在标记内';错误

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Haml';嵌套在标记内';错误相关的知识,希望对你有一定的参考价值。

"When using haml, an html tag is represented using %tagname, but in the case of an HTML tag with attributes, the representation is %tagname{:attribute => value}.

It turns out there must be no whitespace between %tagname and {:attribute => value}. This was the source of a lot of errors when I was trying to write haml forms, since the error message was the cryptic: Illegal Nesting: Nesting within a tag that already has content is illegal."
  1. %p{ :title=> 'stupid example', :style=>'font-weight: bold'}

以上是关于Haml';嵌套在标记内';错误的主要内容,如果未能解决你的问题,请参考以下文章