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
I've found that a regexp literal is not highlighted as a string if it's on the right of one of the logical compound assignment operators, (logical AND, OR, and nullish assignment).
To reproduce
Paste this code into a js2-mode buffer:
foo&&=/bar/;foo||=/bar/;foo??=/bar/;
Expected behaviour
The /bar/ should be highlighted as a string on each line.
Actual behaviour
The slashes don't delimitate a string, and so the contents are highlighted by other rules.
Thanks for the great mode!
The text was updated successfully, but these errors were encountered:
These are relatively new additions to the language, actually. So the main problem here is to start parsing those operators correctly. Then the regexps should right themselves automatically.
I've found that a regexp literal is not highlighted as a string if it's on the right of one of the logical compound assignment operators, (logical AND, OR, and nullish assignment).
To reproduce
Paste this code into a js2-mode buffer:
Expected behaviour
The
/bar/
should be highlighted as a string on each line.Actual behaviour
The slashes don't delimitate a string, and so the contents are highlighted by other rules.
Thanks for the great mode!
The text was updated successfully, but these errors were encountered: