Bug Description
In Handlebars templates, VSCode's syntax highlighting fails to properly recognize the end of a comment block when a whitespace control character (~) is used just before the closing delimiter. As a result, the line following the comment is incorrectly highlighted as if it were still part of the comment.
The following snippet demonstrates the bug:
{{!-- This is a comment --~}}
But this is not
The second line, But this is not, is rendered as a comment, but it should not be.
Steps to Reproduce:
- Paste the following Handlebars code into a .hbs file in VSCode:
{{!-- This is a comment --~}}
But this is not
- Observe the syntax highlighting of the second line.
Expected:
- Only the first line should be highlighted as a comment.
- The second line should be highlighted as normal Handlebars content.
Actual:
- The second line is improperly highlighted as a comment.
Notes:
- This issue occurs with the built-in Handlebars syntax highlighting in the latest VSCode version.
- The bug seems to be specific to comments that use the Handlebars whitespace control character (
~) before the closing braces.
- Extensions disabled: Yes (still reproduces)
- VS Code Version: 1.123.0
- OS Version: MacOS 26.5
Originally from @jmpri3 in microsoft/vscode#320133
Bug Description
In Handlebars templates, VSCode's syntax highlighting fails to properly recognize the end of a comment block when a whitespace control character (
~) is used just before the closing delimiter. As a result, the line following the comment is incorrectly highlighted as if it were still part of the comment.The following snippet demonstrates the bug:
The second line,
But this is not, is rendered as a comment, but it should not be.Steps to Reproduce:
Expected:
Actual:
Notes:
~) before the closing braces.Originally from @jmpri3 in microsoft/vscode#320133