-
Notifications
You must be signed in to change notification settings - Fork 1
[VBScript Colouring] Nested VBScript Blocks In HTML Code Has Incorrect Colours #7
Description
Extension Version
v0.3.4
Description
Syntax highlighting breaks when an ASP expression (<%= %>) that contains an HTML tag is used inside an HTML attribute value. This creates an ambiguous structure that confuses the highlighter — HTML inside VBScript inside an HTML attribute.
The two root causes are:
- The closing
>of<br>is interpreted as the closing tag of the outer HTML element - The
"around"<br>"is interpreted as closing the HTML attribute value early
Current Behaviour
<button type="button" onclick="edtActionItem('<%= Replace(actionItem, vbCrLf, "<br>") %>')">
<img src="images/edit.png" />
</button>The highlighting incorrectly treats:
<br>→ the>is seen as closing the<buttontag"<br>"→ the opening"is seen as ending theonclickattribute value
Expected Behaviour
The full line should be highlighted as an HTML element with an inline ASP expression. The <br> inside the VBScript string and the %> closing tag should not interfere with the HTML attribute or element parsing.
Addtional Context
Semantic tokens were attempted as a fix but the ambiguity is difficult to resolve at the tokeniser level. This issue is known and is likely best ignored or excluded from scope for now, as a proper fix would require a more context-aware parser.