Reputation: 1589
How does one do the following in Jade JS?
<div id="container">
Temperature<p id = "temp">00.00</p>
</div>
i.e., create a nested tag without a newline.
I have tried:
// outputs newline
#container
p#temp 00.00
and
// outputs literal p#temp text
#container p#temp 00.00
But it does not seem to work. Indentation gives a parse error as well. I have looked at the documentation but it does not seem to yield anything.
Upvotes: 1
Views: 1025
Reputation: 11052
You can always just type the html inline:
//thermometer.jade
#container Temperature<p id="temp">#{locals.tempValue}</p>
Upvotes: 1
Reputation: 3572
If you must, you could use:
#container Temperature<p id='temp>00.00</p>
How and why is your whitespace significant?
Upvotes: 0
Reputation: 34313
A span
is the way to go instead of a p
tag
#container
span#temp 00.00
Upvotes: 0