3 ms·
Not sure what toolchain you're using. I'm using the typescript compiler with Mithril and whitespace is preserved for this code: <pre class="debug">{JSON.stri
by brlewis 8y ago
Not sure what toolchain you're using. I'm using the typescript compiler with Mithril and whitespace is preserved for this code:
<pre class="debug">{JSON.stringify(store, null, 4)}</pre>
- awirth 8y agoThat's different than preserving: <pre> foo</pre>
- dunham 8y agoI think they are referring to literal text/whitespace in the template. I don't know about other implementations, but typescript mutates the whitespace if newlines are involved. It seems that the rules are, for any run of literal text: - preserve runs of whitespace that don't contain newlines - drop initial and final whitespace if it contains a newline - collapse any internal runs of whitespace containing newlines to a single space. (based on a quick experiment with tsc.)