我必须使用  在玉的空间? [英] Do I have to use   for space in Jade?
本文介绍了我必须使用  在玉的空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 Jade,除了 Jade 会吃掉"我的空间外,一切都很酷.
I am using Jade and everything is cool except that Jade "eats" my spaces.
例如,在 HTML 中:
For example, in HTML:
<b>Hello</b> <b>World</b>
或
<b>Hello</b>
<b>World</b>
在Hello"和World"之间会有一个空格.
Will have a space between "Hello" and "World".
但是当转换为 Jade 时,它会
But when converting to Jade it'd be
b Hello
b World
当呈现为 HTML 时,空间消失了.喜欢:
When rendered as HTML, the space is gone. Like:
<b>Hello</b><b>World</b>
我是否必须在我的 Jade 模板中添加
或者有什么方法可以在生成的 HTML 中获得一个正常的空间?
Do I have to add
in my Jade template or is there any way I can get a normal space in the generated HTML?
推荐答案
应该这样做:
b Hello
| World
不幸的是,它在我机器上的 Chrome 中生成了这个 HTML 输出:
Unfortunately it produces this HTML output in Chrome on my machine:
<b>
Hello
World</b>
但最后变成了:
结束
b Hello
b World
...也会这样做.
这篇关于我必须使用 &nbsp;在玉的空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文