骗局“非法筑巢”错误
嗨,我是 scalate/scaml 方面的菜鸟(我标记了 haml,因为 scaml 和 haml 很相似)。我有一些如下所示的模板:
-@ var customer : com.x.model.Customer
!!!
%html
%body
%p Contact:
%a{:href => 'mailto:#{customer.email}'}=customer.contact
%p 行标记有此错误:
org.fusesource.scalate.InvalidSyntaxException: Illegal nesting: content can't be given on the same line as html element or nested within it if the tag is closed at 16.17
Hi I'm a total Noob at scalate/scaml (I tagged haml since scaml & haml are similar). I have some template that looks like this:
-@ var customer : com.x.model.Customer
!!!
%html
%body
%p Contact:
%a{:href => 'mailto:#{customer.email}'}=customer.contact
The %p line is flagged with this error:
org.fusesource.scalate.InvalidSyntaxException: Illegal nesting: content can't be given on the same line as html element or nested within it if the tag is closed at 16.17
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 HAML 中,您无法在同一行上提供缩进的内容。
因此,如果您编写
%p Contact:
,则无法向添加任何其他内容。您必须将所有内容移至下一个缩进级别:
In HAML, you can't provide content both on the same line and indented.
So, if you write
%p Contact:
, you can't add anything else to the<p>
. You have to move everything to the next indentation level: