Open Yonom opened 1 week ago
```ts const Test: React.FC = () => { return ( <div> <div /> {/* [!code highlight] */} </div> ); };
gets converted to ```ts const Test: React.FC = () => { return ( <div> <div /> {} </div> ); };
I expected no empty brackets {} to remain. I believe {/* comment */} is the only valid syntax for comments inside JSX.
{}
{/* comment */}
-
I believe the regex here would have to be adjusted to also capture the curly brackets {}
https://github.com/shikijs/shiki/blob/eae73919d4a9c65722acb7455668e3a8f1c31fac/packages/transformers/src/transformers/notation-map.ts#L27
Validations
Describe the bug
I expected no empty brackets
{}
to remain. I believe{/* comment */}
is the only valid syntax for comments inside JSX.Reproduction
-
Contributes