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:

  1. Extended Embedded Languages - https://marketplace.visualstudio.com/items?itemName=ruschaaf.extended-embedded-languages
  2. YAML Embedded Languages - https://marketplace.visualstudio.com/items?itemName=harrydowning.yaml-embedded-languages

Steps to reproduce:

  1. Install VSCode 1.92.0 or the insiders build.
  2. Install one of the above extensions.
  3. Create a yaml file with the following content:
test: | #js
  console.log("hello world")
  1. Make sure the js code gets highlighted correctly

This is how it looks like in 1.92.0 image

1.91.1: image

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (13 by maintainers)

Commits related to this issue

Most upvoted comments

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 not

if I remove the ([\t ]*+) part it starts working image

but it will still break down when inside a nested block-map image this is because the other extensions use ^ instead of (^|\\G) they will need to fix that part for themselves Extended Embedded Languages YAML Embedded Languages

Duplicate 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.