Yesterday's release broke some mdx syntax highlighting for me
kentcdodds opened this issue · 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
Link to runnable example
No response
Steps to reproduce
Install the latest version of vscode-mdx
Open a markdown file with some markdown, even simple markdown will do. Here are some examples:
# Hello world
This **should** be highlighted
import Comp from './comp'
<Comp prop={34} prop2="hi">
This: `should be syntax highlighted`.
</Comp>
## This should be highlighted
And _this_ should be too...
This is a list:
- why
- are
- these
- hyphens
- green?
No big deal, just kinda surprised...
Expected behavior
Things like headings, strong, italics, and inline code blocks should be highlighted.
Actual behavior
The colors are either non-existent or different from what I was used to before. The components look great though 👍
I'm using Night Owl, but these behaviors show up in others as well. I guess what I would really like is if my MDX highlighting looked as close to the regular markdown highlighting as possible.
Here's what the examples above look like with regular markdown highlighting in Night Owl:
(Yeah, MDX does better on this one for sure)
This could just be a case of "someone moved my cheese," but I do think there could be something wrong with the highlighting of the headings, strong, italics, and text in the back-tics.
Thanks!
Runtime
Node v18
Package manager
npm v9
OS
macOS
Build and bundle tools
No response
Hi Kent! Thanks for taking the time to test it out and provide feedback!
I’m going to move this to https://github.com/wooorm/markdown-tm-language. That’s where the code is. This grammar will also be used in other places, with other users, so it’s useful to have the discussions there.
There’s also a demo there: https://wooorm.com/markdown-tm-language/. Which is useful to compare. Because everyone’s themes are different.
I’m closing this issue in favor of the upstream one.