-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
(javascript) JSX does not properly handle inline {} code #2324
Comments
Inline {} code may also contain mixed JS/XML syntax: const Count = ({ count }) => {
return (
<div>
{count > 10 ? <BigCount /> : <SmallCount />}
</div>
);
} |
Right. Pretty sure fixing this is doing to require a custom sublanguage (I don't think we need to continue to add random things to XML because XML can be used in many NON-JSX contexts). The grammar itself could provide the custom sublanguage and register it. I'd suggest perhaps not a sublanguage at all except for the fact that right now a sublanguage is the only way to switch case sensitive/insensitive modes and JS and XML have different case semantics. |
I see. Thanks Josh. |
Related: #2412 |
Sample from #1915:
The text was updated successfully, but these errors were encountered: