Sublime Forum

Syntax Highlighting Bug

#1

Paste this in a javascript file:
/asdfsdf/, /asdfasdfdsf/
The first regex is highlighted, the second is not. The second does not have the source.regex.js scope, but the first does.

Because of that, you get other problems such as this:
/asdfsdf/, /asdfas"dfdsf/
var xyz;
You will see that var xyz; is highlighted as a string, which is the real annoyance for this bug.

0 Likes

#2

Try changing this line in your tmLanguage file from:

(?<==(:]|^|return|&&|\|\||!)\s*(/)(?!/*+{}?])

to:

(?<==(:]|^|\s|return|&&|\|\||!)\s*(/)(?!/*+{}?])
0 Likes