vscode: Embedded languages syntax highlighting stopped working in 1.92.0
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.92.0
- OS Version: Windows 10, macOS 14 Sonoma
I have been using the following two extensions a lot. Since 1.92.0 update both extensions stopped working meaning the embedded code in JS does not get highlighted inside of YAML anymore. Each extension basically does the same job for me, so I tried to switch from one to another before realizing that my VSCode got an update and this functionality stopped working in both extensions. I’ve also tried the insiders build and the problem is still there. When I downgraded to 1.91.1, the extensions worked perfectly. This happens on both Windows and Mac.
The extensions are:
- Extended Embedded Languages - https://marketplace.visualstudio.com/items?itemName=ruschaaf.extended-embedded-languages
- YAML Embedded Languages - https://marketplace.visualstudio.com/items?itemName=harrydowning.yaml-embedded-languages
Steps to reproduce:
- Install VSCode 1.92.0 or the insiders build.
- Install one of the above extensions.
- Create a yaml file with the following content:
test: | #js
console.log("hello world")
- Make sure the js code gets highlighted correctly
This is how it looks like in 1.92.0
1.91.1:
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (13 by maintainers)
Commits related to this issue
- Remove explicit `whitespace.separator` prefix from `block-scalar` — committed to RedCMD/YAML-Syntax-Highlighter by RedCMD 2 years ago
- Fix embedding yaml — committed to RedCMD/YAML-Syntax-Highlighter by RedCMD 2 years ago
- Embedded languages syntax highlighting stopped working in 1.92.0 Fixes #224978 — committed to microsoft/vscode by alexr00 2 years ago
- Re-adopt new YAML grammar! (#232244) * Embedded languages syntax highlighting stopped working in 1.92.0 Fixes #224978 * Get embedded grammar — committed to saschazepter/vscode by alexr00 2 years ago
Awesome, I’ll try adopting https://github.com/RedCMD/YAML-Syntax-Highlighter again for the November milestone.
"block-scalar"was taking precedence over injections because it was consuming the whitespace before it while the embedded language extensions were notif I remove the
([\t ]*+)part it starts workingbut it will still break down when inside a nested block-map
this is because the other extensions use
^instead of(^|\\G)they will need to fix that part for themselves Extended Embedded Languages YAML Embedded LanguagesDuplicate of https://github.com/microsoft/vscode/issues/224862.
Should be fixed by https://github.com/microsoft/vscode/pull/224954 in the very latest insiders (from d4c4e690b9f1e70291da9a46c5c8ac5ebfbda81a) and will be fixed in the upcoming recovery release.
Possibly fixed by https://github.com/microsoft/vscode/pull/224954