Aw Qirui Guo Aw Qirui Guo - 8 months ago 112
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?


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.