html-to-jsx icon indicating copy to clipboard operation
html-to-jsx copied to clipboard

Text node whitespace behaviour

Open wkrueger opened this issue 6 years ago • 2 comments

React (or JSX) intentionally "deviates" from HTML in which, when a text node encounters a line break, HTML will add a white space, but react wont.

Thats probably why sometimes prettier adds {' '} while reformatting.

https://github.com/facebook/react/issues/1643

It would be great if this extension also took that in consideration when converting.

Great work, thx

wkrueger avatar Dec 07 '18 05:12 wkrueger

ok, this is on the shoulders of https://github.com/reactjs/react-magic

wkrueger avatar Dec 07 '18 05:12 wkrueger

@wkrueger yup thats correct i just wrapped it for to be used in vscode :), since i had to frequntly has to convert html to jsx

riazXrazor avatar Dec 07 '18 07:12 riazXrazor