Using transformerNotationHighlight in JSX code
Author: YonomCreated Sep 5, 2024Updated May 15, 2026
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Describe the bug
```ts
const Test: React.FC = () => {
return (
<div>
<div /> {/* [!code highlight] */}
</div>
);
};
```gets converted to
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.
Reproduction
Contributes
- I am willing to submit a PR to fix this issue
- I am willing to submit a PR with failing tests
Source: shikijs/shiki