Currently contents like
<b>{this.title}</b> <span>123</span>
are converted to
React.DOM.b(null, this.title), " ", React.DOM.span(null, "123")
which is logical and expected since whitespace might change the layout (i.e. inside element with white-space: pre and in other cases).
However:
<pre>
<b>{this.title}</b> <span>123</span>
</pre>
is converted to
React.DOM.pre(null,
React.DOM.b(null, this.title), " ", React.DOM.span(null, "123")
)
so whitespaces across newlines are inserted only in code, but not treated as regular text, which means we loose them completely in generated layout.
Shouldn't we treat them as text too?
Currently contents like
are converted to
which is logical and expected since whitespace might change the layout (i.e. inside element with
white-space: preand in other cases).However:
is converted to
so whitespaces across newlines are inserted only in code, but not treated as regular text, which means we loose them completely in generated layout.
Shouldn't we treat them as text too?