react-magic
react-magic copied to clipboard
White-space conversion on text nodes or inline elements
https://github.com/facebook/react/issues/1643
React and HTML handle a bit differently when text nodes and the next element have a line break between them. HTML may add an extra whitespace. It even seems prettier also accounts for this since it also adds whitespaces sometimes when reformatting.
This allows for small possible layout differences between the original HTML and the generated JSX. For an "accurate" conversion, {" "}
s or
s should be added on some cases.
Would you be willing to submit a pull request to fix this?
Has anone fixed this?