I cannot reproduce this. Which version do you use?
Variables inside block tags
This code:
h3.subtitle
| Title text
Compiles to:
html
<h3 class="subtitle">
Title text
</h3>
So the text inside is always placed on a new line.
There's an issue on variables usage, here's an example:
h3.subtitle
- if $lang == 'de'
| Title text, de
- else
| Title text, en
HTML output:
html
<h3 class="subtitle">Title text, de
</h3>
There's no new line, text is placed directly after the opening tag. Same happens for the inline tags:
h3.subtitle
- if $lang == 'de'
a href='#" Title text, de
- else
a href='#" Title text, en
HTML output:
html
<h3 class="subtitle"><a href="#">Title text, de</a>
</h3>
I hope this issue can be fixed.
该提问来源于开源项目:slim-template/slim
- 点赞
- 写回答
- 关注问题
- 收藏
- 复制链接分享
- 邀请回答