在haml中,以下内容将生成正确嵌套的HTML:
%p Hi There I'm inside this paragraph
%button I'm also inside this paragraph
产地:
<p> Hi There I'm inside this paragraph <button>I'm also inside this paragrpah</button></p>
如果我这样做在Emblem.js中:
p Hi There I'm inside this paragraph
%button I'm also trying to be in the paragraph
它产生了这个:
<p> Hi There I'm inside this paragraph %button I'm also trying to be in the paragraph</p>
有没有人知道如何在emblem.js中嵌套内容和元素?
答案 0 :(得分:0)
p Hi There I'm inside this paragraph
button I'm also trying to be in the paragraph
没有%
的会做到这一点
我建议您查看http://emblemjs.com/syntax/,这是一个很好的资源,可以简要介绍每个可能的用例。