wooorm / markdown-tm-language

really good syntax highlighting for markdown and MDX
https://wooorm.com/markdown-tm-language/
MIT License
42 stars 1 forks source link

Unclosed curly bracket causes syntax highlighting to stop #9

Closed karlhorky closed 3 months ago

karlhorky commented 3 months ago

Highlighting of a non-paired opening curly bracket in a code block in MDX with markdown-tm-language (.mdx file via the MDX VS Code extension) causes the highlighting to stop after the code block:

```tsx
export default function App(props) {
  console.log('>> Console logging from Expo app');

Expo dev server

abc


![Screenshot 2024-07-08 at 22 26 38](https://github.com/wooorm/markdown-tm-language/assets/1935696/746845d9-9358-4a18-9a2e-8228e5150424)

Adding the missing closing curly bracket fixes the highlighting:

![Screenshot 2024-07-08 at 22 31 50](https://github.com/wooorm/markdown-tm-language/assets/1935696/162f13c5-3019-44f9-a1ba-97aee79fd94e)

Markdown highlighting in VS Code (`.md` file, without MDX extension installed) with the unmatched opening curly bracket, for comparison:

![Screenshot 2024-07-08 at 22 26 49](https://github.com/wooorm/markdown-tm-language/assets/1935696/79cd3711-4f44-4eba-a3fe-902f379b1310)
wooorm commented 3 months ago

Thanks, done!

karlhorky commented 3 months ago

Wow super fast, thanks!