vscode: syntax highlighting breaks if no spaces between keyword and brace
Author: lalamefineCreated Apr 24, 2025Updated May 12, 2026
Labelsbugenhancementhelp wantedgood first issuevscodemiscNeedsImplementation
Description Syntax highlighting does not work correctly when there is no space between the else of an "if - else" patern and the following openning curly brace
Working exemple :
if test {
<div>IF</div>
} else { // space between else and braket : Everything works fine
<div>ELSE</div>
}Broken exemple :
if test {
<div>IF</div>
} else{ // no space between else and braket : Highlighting broken from here
<div>ELSE</div>
}Expected Behavior Both variations should be highlighted correctly since they are valid syntax.
Actual Behavior When the space is omitted, the HTML is not recognized and remains unhighlighted from here.
Impact This issue is minor, it's just for consistency with the engine.
Source: a-h/templ