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';嵌套在标记内';错误的主要内容,如果未能解决你的问题,请参考以下文章

在值列表中查找标记

jss0.1-使用Javascript的嵌套CSS

在 ruby​​ 中编写条件的正确格式,然后使用 HAML 标记内的字符串插值将输出转换为字符串

Apache';禁止的';Mac~/Sites文件错误

带有锚定标记的jQuery提交表单

向图像添加缺少的Alt标记-WordPress内容筛选器