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.
In Razor, I addressed this by wrapping the whitespace with a multi-line comment:
<div>
<span>No trailing</span><!--
--><span>space</span>
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With