You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Empty character classes, while not very useful, are valid JS/TS and should be supported. This issue is especially noticeable while writing regexes because highlighting breaks whenever you add a new character class.
Code
leta=/foo[]bar/;letb=/foo[^]bar/;
Will be highlighted as:
Fix
The pattern for character classes is \[([^\]\\]|\\.)+\], right now. Simply changing it to \[([^\]\\]|\\.)*\] (uses * not +) should fix the issue.
The text was updated successfully, but these errors were encountered:
TS and JS Grammar Extension version: 0.0.53 / latest
Description
Empty character classes, while not very useful, are valid JS/TS and should be supported. This issue is especially noticeable while writing regexes because highlighting breaks whenever you add a new character class.
Code
Will be highlighted as:
Fix
The pattern for character classes is
\[([^\]\\]|\\.)+\]
, right now. Simply changing it to\[([^\]\\]|\\.)*\]
(uses*
not+
) should fix the issue.The text was updated successfully, but these errors were encountered: