SlideBase.jade
.slideWrap
.slideInner
block slides
slideSet1.jade
extends SlideBase
append slides
.slide set1slide1
.slide set1slide2
.slide set1slide3
slideSet2.jade
extends SlideBase
append slides
.slide set2slide1
.slide set2slide2
.slide set2slide3
output.jade
#mySlides
p some copy
#slideZone
include slideSet1.jade
include slideSet2.jade
预期结果:
<div id="mySlides>
<p>some copy</p>
<div id="slideZone>
<div class="slideWrap>
<div class="slideInner>
<div class="slide">set1slide1</div>
<div class="slide">set1slide2</div>
<div class="slide">set1slide3</div>
</div>
</div>
<div class="slideWrap>
<div class="slideInner>
<div class="slide">set2slide1</div>
<div class="slide">set2slide2</div>
<div class="slide">set2slide3</div>
</div>
</div>
</div>
</div>
实际结果:
<div id="mySlides>
<p>some copy</p>
<div id="slideZone>
<div class="slideWrap>
<div class="slideInner>
<div class="slide">set1slide1</div>
<div class="slide">set1slide2</div>
<div class="slide">set1slide3</div>
</div>
</div>
<div class="slideWrap>
<div class="slideInner>
<div class="slide">set1slide1</div>
<div class="slide">set1slide2</div>
<div class="slide">set1slide3</div>
</div>
</div>
</div>
</div>
而不是获取slideSet2.jade,jade编译器只是在其位置重复slideSet1.jade。我在这里做错了什么?
内容:
我使用Jade版本0.27.2运行Codekit;任何被接受的答案都解决了为什么它不能在我的环境中工作。
答案 0 :(得分:0)
此问题已在较新版本的jade中修复。 CodeKit的版本应该更新。