Change:
Type: <bBug</bIn the latest release syntax highlighting in html files with included JavaScript is so far off it's unusable. I have a comment (which should be green) Syntax highlighting has the the correct color. is dark blue. is green again. is a different color blue. The color choices and what parts of words are highlighted seems random. VS Code version: Code 1.71.2 (, 2022-09-14T21:07:15.900Z) OS version: Darwin arm64 21.6.0 Modes: Sandboxed: No <details<summarySystem Info</summary </details<details<summaryExtensions (105)</summaryExtensionVersion ------ html-snippets0.2.1 vscode-languagetool3.8.0 vscode-languagetool-en3.8.0 vscode-icalendar1.0.1 vscode-color0.4.5 code-gnu-global0.2.2 simple-react-snippets1.2.7 vscode-reveal-hugo0.2.5 doxdocgen1.4.0 vscode-postgresql-client25.7.11 vscode-mac-color-picker1.1.0 vscode-eslint2.2.6 vscode-instant-markdown1.4.7 vscode-springboot-snippets1.2.0 xml2.5.1 rust-syntax0.6.1 vscode-html-css1.13.1 EditorConfig0.16.4 vscode-npm-script0.3.28 esp-idf-extension1.5.0 vscode-diff1.4.2 markdown-table-formatter2.2.4 change-case0.0.6 vs-code-http-server-and-html-preview2.2.2 copilot1.47.6882 go0.35.2 CppSnippets0.0.15 rest-client0.25.1 flux1.0.4 mediawiki0.0.4 tablegenerator1.0.4 better-cpp-syntax1.15.19 react-component1.1.0 vscode-hacker-typer0.1.1 diff-tool0.0.1 hugo-shortcode-syntax1.0.0 vscode-github0.30.7 cortex-debug1.6.5 vscode-language-babel0.0.36 vscode-clang0.2.4 vscode-http-client0.34.0 prettify-json0.0.3 mongodb-vscode0.9.3 mongoose-os-ide0.6.0 vscode-docker1.22.1 csharp1.25.0 data-workspace-vscode0.3.0 mssql1.16.0 sql-bindings-vscode0.3.0 sql-database-projects-vscode0.19.0 python2022.14.0 vscode-pylance2022.9.40 jupyter2022.8. jupyter-keymap1.0.0 jupyter-renderers1.0.9 remote-containers0.251.0 remote-ssh0.84.0 remote-ssh-edit0.82.0 remote-wsl0.66.3 vscode-remote-extensionpack0.21.0 cmake-tools1.12.27 cpptools1.12.4 cpptools-extension-pack1.3.0 live-server0.4.1 vsliveshare-pack0.4.0 vscode-react-native1.9.3 sqltools0.25.1 sqltools-driver-pg0.3.0 vetur0.36.0 particle-vscode-core1.15.4 particle-vscode-pack1.15.4 particle-vscode-snippets1.15.4 vscode-boot-dev-pack0.1.0 vscode-concourse1.39.0 vscode-manifest-yaml1.39.0 vscode-spring-boot1.39.0 platformio-ide2.5.4 r-debugger0.4.7 java1.10.0 r2.5.3 wordcount0.1.33 bash-debug0.3.9 rust-analyzer0.3.1221 sockscode-vscode1.0.1 stackery1.1.4 spellchecker1.4.0 markdowntable0.10.2 html-preview-vscode0.2.5 cmake0.0.17 vscode-arduino0.4.12 vscode-java-debug0.44.0 vscode-java-dependency0.21.0 vscode-java-pack0.25.2 vscode-java-test0.37.1 vscode-maven0.39.0 vscode-spring-boot-dashboard0.7.1 vscode-spring-initializr0.11.0 codetour0.0.58 gistfs0.4.1 vscode-wakatime19.3.0 full-react-snippets1.4.2 vscode-java-saber0.1.2 markdown-all-in-one3.4.3 vscode-aspell0.1.4 propertylist0.0.2 (2 theme extensions excluded) </details<details<summaryA/B Experiments</summary</details<!-- generated by issue reporter --
<img width="940" alt="Screen Shot 2022-09-28 at 6 56 06 PM" src="https://user-"<img width="879" alt="Screen Shot 2022-09-28 at 6 15 54 AM" src="https://user-"
Does this reproduce in the with all ?
It sure does. <img width="517" alt="Screen Shot 2022-09-28 at 7 12 08 PM" src="https://user-"<img width="705" alt="Screen Shot 2022-09-28 at 7 13 25 PM" src="https://user-"
Please share the text of file that causes this
It ain't pretty ...
It's a template file for Hugo. Specifically a file called
same as semantic highlighting is broken for some reason
Reproduced with The special thing that there's a new line right after

Discussion:
} function substituteWithWhitespace(result: string, start: number, end: number, oldContent: string, before: string, after: string) { <del> let accumulatedWS = 0; </del> result += before; <del> for (let i = start + before.length; i < end; i++) { </del> <ins> let accumulatedWS = -before.length; // start with a negative value to account for the before string for (let i = start; i < end; i++) { </ins> const ch = oldContent[i]; if (ch === 'n' || ch === 'r') { // only write new lines, skip the whitespace

assertEmbeddedLanguageContent('<div onKeyUp="foo()" onkeydown="bar()"/>', 'javascript', '              foo();            bar();  '); assertEmbeddedLanguageContent('<div onKeyUp="return"/>', 'javascript', '              return;  '); <ins> assertEmbeddedLanguageContent('<div onKeyUp=returnn/><script>foo();</script>', 'javascript', '             return;n          foo();         '); </ins> }); });