【发布时间】:2011-05-07 02:06:01
【问题描述】:
嗨,我是 scalate/scaml 的菜鸟(我标记了 haml,因为 scml 和 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
【问题讨论】:
-
当我从 %p 行中删除 "Contact:" 时,它会使它进一步......成为其他一些语法错误。但我不明白为什么我做错了。我希望 html 是
Contact: xxxx
-
将“Contact:”放入 %span 似乎是一种解决方法...