You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React templates should properly trim trailing spaces when the text is on a different line respect to the enclosing tags. E.g.
<div>
Hello
</div>
should result in
<div>Hello</div>
when compiled.
Instead, as of today, it's rendered as:
<div> \n Hello \n</div><!-- when normalizeHtmlWhiteSpace==false --><div> Hello </div><!-- when normalizeHtmlWhiteSpace==true, notice the trailing extra spaces -->
I think we should align the behavior to what JSX compilers do, that is trim trailing spaces and newlines if the text spans over different lines. I can submit a PR if anyone is interested.
The text was updated successfully, but these errors were encountered:
React templates should properly trim trailing spaces when the text is on a different line respect to the enclosing tags. E.g.
should result in
when compiled.
Instead, as of today, it's rendered as:
I think we should align the behavior to what JSX compilers do, that is trim trailing spaces and newlines if the text spans over different lines. I can submit a PR if anyone is interested.
The text was updated successfully, but these errors were encountered: