Open joshgoebel opened 4 years ago
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.
Sample from #1915: