我遇到了简单的玉石布局问题,例如:
include test.jade
#bar hi
并在test.jade
#foo hello
无论如何,#bar
始终呈现为#foo
的孩子。
<div id="foo">hello
<div id="bar">hi</div>
</div>
当我想要实现
时<div id="foo">hello</div>
<div id="bar">hi</div>
如果我做错了或者这是玉的预期行为,我会感到困惑吗?
我正在使用brunch和static-jade-brunch制作我的玉石模板,所以我不确定问题所在,或者我是否遗漏了什么?
答案 0 :(得分:0)
嗯,好吧,我不确定这是否是正确的解决方案,但我发现我必须将include包装在一个块中:
block test
include test.jade
#foo hello
我有所需的输出。