-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't workinggrammarTextMate grammar / syntax highlightingTextMate grammar / syntax highlighting
Description
Summary
When ST code is highlighted inside TwinCAT/CoDeSys XML export tags via the XML injection grammar, the < and > comparison operators appear red in Dark+ (and similar) themes.
Root cause
The VS Code XML grammar claims CDATA blocks as string.unquoted.cdata.xml before the injection grammar can take ownership. Even with R: injection priority and - string exclusion, the string scope leaks into the ancestor scope stack for the embedded content. Dark+ colours all string scopes #ce9178 (orange-red), which overrides keyword.operator.comparison.st.
Acceptance criteria
<and>inside CDATA ST content render as operator colour (grey/white in Dark+), not red- All other ST operators and keywords unaffected
- XML highlighting outside the injection blocks unaffected
Possible approaches
- Find an injectionSelector combination that fully prevents
string.unquoted.cdata.xmlfrom appearing as an ancestor scope inside the embedded block - Override the
string.unquoted.cdata.xmlscope colouring in the extension's contributes.configurationDefaults foreditor.tokenColorCustomizations - Rename
keyword.operator.comparison.stto a scope that is not overridden by thestringancestor rule in common themes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggrammarTextMate grammar / syntax highlightingTextMate grammar / syntax highlighting