Skip to content

vala.lang: Fixed regex detection

JCWasmx86 requested to merge JCWasmx86/gtksourceview:master into master

For #257 (closed) (Maybe I expressed myself really poorly, the syntax was absolutely correct):

Before, the line

if(!/^(?=[^\d])[^\s~`!#%^&*()\-\+={}\[\]|\\\/?.>,<'";:]+$/.match("str")) {

was parsed as

if <someRandomTokensUntilQuotationMark> and then a string literal.

This lead to ugly highlighting like this:

image

Basically anything after that regex was detected as a string literal.

With this change it looks like this:

image

The highlighting is correct now.

Now it is parsed in the right way:

if NotOperator SomeRegex .match("...")....

Merge request reports