Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

White-space conversion on text nodes or inline elements #161

Open
wkrueger opened this issue Dec 7, 2018 · 2 comments
Open

White-space conversion on text nodes or inline elements #161

wkrueger opened this issue Dec 7, 2018 · 2 comments

Comments

@wkrueger
Copy link

wkrueger commented Dec 7, 2018

facebook/react#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.

@Daniel15
Copy link
Member

Would you be willing to submit a pull request to fix this?

@PvanHengel
Copy link

Has anone fixed this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants