Open skylize opened 1 year ago
Thanks for reporting! Does this affect other bracket types, besides ]
?
~No other bracket types found so far, except that the character literal itself in the last example is a closing paren, with the square bracket only playing a supporting role.~
All bracket types are fully in play.
\) ; 💣
\} ; 💣
\] ; 💣
That makes more sense, actually. Haven't tested myself yet, but I now expect \[
and friends to also cause troubles for the highlighting.
The structural editing seems to handle these escaped characters, right? Maybe we can make the highlight module lean more on the tokenization used for there. I thought we already did, but apparently not.
Several examples of character literals colored as invalid syntax.
The primary symptom is a square closing bracket char literal
\]
colors as invalid.But in some contexts, the
]
in\]
is interpreted as closing an earlier bracket, with the bracket that actually closes the form being marked invalid instead.One case found so far where the character literal is not
\]
, but the expression needs to have a]
in it to trigger the bug.