-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VSCode 1.92 YAML grammar breaks MDX syntax highlighting #224862
Comments
Seems like this came in with the new yaml grammar #219833 I believe that grammars that use @RedCMD Is there anything that can be done on the yaml grammar side to handle this more elegantly? |
@mjbvz I'll see what I can do its caused by this line being too greedy there definitely is quite a few extensions using the old FrontMatter code https://github.com/search?q=lang%3Ajson+A-%7B3%7D&type=code 200+ |
For the recovery release, I'm going to roll back to the old grammar. In insiders, I'll fix forward and grab your fix @RedCMD. |
is there a way to roll back to the previous grammar while we await a release? I can tell our users to install the redhat extension, but a fix that required no action of them would be better |
The release went out yesterday. |
Thank you, I upgraded and this seems fixed in 1.92.1 |
Verified in |
[](แชร์ & ชวนเพื่อนจองทริป รับเลย Trip Coins 200 บาท! ยิ่งแชร์ยิ่งคุ้ม บอกต่อแอปดีๆ ให้เพื่อนของคุณเลย |
In 1.94.1 vs code corrupts code highlighting after YAML block again ( |
Thanks for reporting @FragsterAt. I'm reverting the YAML grammar in the main branch, so the next VS Code insiders will not have this issue. We've missed the chance to get the fix into 1.94.2, but if we have a 1.94.3, then I'll make the change there too. |
Actually, @FragsterAt I'm not seeing the same issue: |
Ah, I had an extension installed that was providing a different yaml grammar. I still see the bug. |
Please look in vuejs/language-tools#4831 In 1.93.1 All was ok, but in 1.94.1 it broken again. .vue files can have "sections" in different languages, yaml section breaks highlighting (now a little different in comparison to 1.93.0, but still corrupted) in next sections with yaml block in 1.94.1 (different from 1.93.0) https://gist.github.com/FragsterAt/213f76e1e6a4592ac071236849af6392 |
Moving to the normal October milestone. |
Grammar revert is already done in main. |
Does this issue occur when all extensions are disabled?: No, VSCode 1.92 YAML grammar updates cause a regression when embedded in the MDX syntax highlighting.
Steps to Reproduce:
code --disable-extensions
unifiedjs.vscode-mdx
extensionwhatever.mdx
with the following content:Notice how the syntax highlighting is broken. This was not the case in VSCode < 1.92.
Removing all lines from the frontmatter fixes it:
Proper MDX syntax highlighting
A workaround is to install the
redhat.vscode-yaml
extension. This uses a different YAML grammar.Related issues:
The text was updated successfully, but these errors were encountered: