vscode-textmate: Html script closing-tag not detected when occurs immediately after 2 slashes

Hi, I found a bug, with the html grammar in VS Code, when you place a closing script-tag in the same line immediately after 2 fwd slashes, as: <script> //</script> the grammar will not detect the closing tag, and will display it with wrong color, see images.

(I’m not sure if the issue is related only to vscode-textmate, or it belongs to textmate/html.tmbundle).

VS Code: sample

Visual Studio 2015: capture


  • VSCode Version: Code 1.13.1 (379d2efb5539b09112c793d3d9a413017d736f89, 2017-06-14T18:21:47.485Z)
  • OS Version: Windows_NT ia32 10.0.15063

Steps to Reproduce:

  1. Open any html document with VSCode.
  2. Insert a script element in the document, and place the script’s closing-tag immediately after 2 fwd slashes.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (8 by maintainers)

Commits related to this issue

Most upvoted comments

I think this is not a vscode-textmate issue. The problem here is that the html grammar includes source.js which is HTML agnostic and “eats up” all characters of a line comment to the end of the line for example. IMHO we would need to have a special source.html-embedded.js or something which is always looking for </script>. AFAIK there are no other workarounds for an embedded TM grammar.