Closed MageJohn closed 3 years ago
Thanks for the report.
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.
This should do it.
Amazing, thanks for the quick fix!
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!