Aw Qirui Guo Aw Qirui Guo - 1 year ago 201
Jade Question

Do I have to use   for space in Jade?

I am using Jade and everything is cool except that Jade "eats" my spaces.

For example, in HTML:

<b>Hello</b> <b>World</b>



Will have a space between "Hello" and "World".

But when converting to Jade it'd be

b Hello
b World

When rendered as HTML, the space is gone. Like:


Do I have to add
in my Jade template or is there any way I can get a normal space in the generated HTML?

Answer Source

This should do it:

b Hello
  | World

Unfortunately it produces this HTML output in Chrome on my machine:


But in the end it becomes:

enter image description here

To come to an end

b Hello &nbsp;
b World

...will do it too.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download