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

Strings in jsx attribute values are incorrectly parsed as JSXExprContainer #615

Closed
dsherret opened this issue Jan 29, 2020 · 7 comments
Closed
Labels
Milestone

Comments

@dsherret
Copy link
Contributor

Describe the bug

In the following code...

let c = <Test attrib="5" />;

...no JSXExprContainer exists, yet the string is parsed as a JSXExprContainer with an empty span.

@dsherret dsherret added the C-bug label Jan 29, 2020
@dsherret
Copy link
Contributor Author

Oh! This is what's causing #614! I can submit a fix.

@kdy1
Copy link
Member

kdy1 commented Jan 29, 2020

@dsherret Nice catch!

@kdy1 kdy1 added this to the v1.1.17 milestone Jan 29, 2020
@dsherret
Copy link
Contributor Author

dsherret commented Jan 29, 2020

@kdy1 actually, I'm not sure what the best fix for this is. Might be best for you to do it.

But yeah, the problem is line 89 in jsx.rs

@kdy1
Copy link
Member

kdy1 commented Jan 29, 2020

I'll fix it soon.

kdy1 added a commit to kdy1/swc that referenced this issue Jan 29, 2020
bors bot pushed a commit that referenced this issue Jan 29, 2020
bors bot pushed a commit that referenced this issue Jan 29, 2020
@bors bors bot closed this as completed in 0165958 Jan 29, 2020
@kdy1
Copy link
Member

kdy1 commented Jan 29, 2020

@dsherret Fixed and published a new verison.

@dsherret
Copy link
Contributor Author

dsherret commented Jan 29, 2020

Amazing once again. Thanks @kdy1! Everything is working now.

@swc-bot
Copy link
Collaborator

swc-bot commented Oct 28, 2022

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

3 participants