Reputation: 4619
I have to print out an input
tag and a label
without any space between the end of one tag and the start of the next... but I also want to pretty-print the rest of the document.
By default — with pretty printing turned on in Jade — I get the following:
<input ...></input>
<label ...></label>
I want:
<input ...><label ...></label>
or
<input ...></input><label ...></label>
The idea from Jade - Controlling line-breaks in the HTML output doesn't work because input
is a self-closing tag.
Update 1: I have created the obvious solution using a mixin
and literal HTML, but I would like to avoid that if possible.
Upvotes: 7
Views: 173
Reputation: 1276
In Razor, I addressed this by wrapping the whitespace with a multi-line comment:
<div>
<span>No trailing</span><!--
--><span>space</span>
</div>
Upvotes: 1