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

fix: Make JSX respect advanced white-space characters (fixes #217) #218

Merged
merged 1 commit into from Sep 25, 2019

Conversation

maranomynet
Copy link
Contributor

@maranomynet maranomynet commented Sep 19, 2019

HTML only collapses normal space, tabs and newlines.
React's JSX (and Babel) traditionally also does that.

Bublé, however, has until now greedily killed all types of spaces,
except for   which it turned into HTML-escaped entity,
which in turn breaks the text-node rendering in Mithril.js and Hyperscript.js.

(See #217 for more info)

)

HTML only collapses normal space, tabs and newlines.
React's JSX (and Babel) traditionally also does that.

Bublé, however, has until now greedily killed all types of spaces,
except for   which it turned into HTML-escaped entity.
Copy link
Collaborator

@mourner mourner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for taking the time to make a fix!

@mourner mourner merged commit 2da2ddb into bublejs:master Sep 25, 2019
luiscubal pushed a commit to jscrambler/buble that referenced this pull request Nov 15, 2019
) (bublejs#218)

HTML only collapses normal space, tabs and newlines.
React's JSX (and Babel) traditionally also does that.

Bublé, however, has until now greedily killed all types of spaces,
except for   which it turned into HTML-escaped entity.
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

Successfully merging this pull request may close these issues.

None yet

2 participants