JS Fenced code block breaks highlighting when indented
XiNiHa opened this issue · 7 comments
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and couldn’t find anything (or linked relevant results below)
Affected packages and versions
vscode-mdx@1.8.2
Link to runnable example
No response
Steps to reproduce
Open an MDX file in VSCode, write this:
<Comp>
```js
console.log(0);
```
</Comp>
<Comp>
```ts
console.log(0);
```
</Comp>
<Comp>
```js
console.log(0);
```
</Comp>
Expected behavior
All should be highlighted correctly.
Actual behavior
The first two works correctly. But the last one breaks and continues to pretend like JS even after the fence.
Runtime
No response
Package manager
No response
OS
No response
Build and bundle tools
No response
Oh well, it was a wrong interaction with Babel JavaScript extension. Removing the extension fixed it.
Does it also cause this issue for JavaScript in HTML / Astro / Vue?
Volar doesn’t handle syntax highlighting. That’s handled by TextMate grammars. It’s not something I’m super familiar with, but it looks like the Babel JavaScript extension doesn’t properly close a particular scope. It’s a bug in that extension, not here.
Hi! This was closed. Team: If this was fixed, please add phase/solved
. Otherwise, please add one of the no/*
labels.