-
Notifications
You must be signed in to change notification settings - Fork 138
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
JSX fragments are broken #254
Comments
Thanks! Hopefully shouldn't be too bad to fix. By the way, if you happen to know any significant open source projects that use JSX fragments, would be good to hear. Most of correctness issues in Sucrase have been found by running it on codebases I can find, and when I added fragment support I just wrote a few test cases myself, but obviously there were plenty of missing edge cases like these. |
I don't know of any code base that uses them. You could just grab a few of the tests from Babel to ensure compatibility. |
Fixes #254 `jsxParseOpeningElement` isn't supposed to parse the last token, but was doing so, and it happened to work in the existing test cases.
Fixes #254 `jsxParseOpeningElement` isn't supposed to parse the last token, but was doing so, and it happened to work in the existing test cases.
Fixes #254 `jsxParseOpeningElement` isn't supposed to parse the last token, but was doing so, and it happened to work in the existing test cases.
Empty fragments and fragments without whitespace do not work
https://sucrase.io/#selectedTransforms=jsx,imports&compareWithTypeScript=true&code=const%20c%20%3D%20%3C%3E%3C%2F%3E%3B%0A
https://sucrase.io/#selectedTransforms=jsx,imports&compareWithTypeScript=true&code=const%20c%20%3D%20%3C%3E%3Ca%2F%3E%3C%2F%3E%3B%0A
The text was updated successfully, but these errors were encountered: