Sublime Forum

Perl syntax highlighting broken after // operator if string contains a slash

#1

Syntax highlighting is broken, as in example, using // operator, if the string on its right side contains a slash.

my $myvar = $othervar // 'empty';
my $what = 'no'; # Highlighter still OK

my $myvar = $othervar // 'empty/ornot';
my $what = 'no'; # Highlighter broken

It’s possible to work around this problem by escaping the slash:

my $myvar = $othervar // 'empty\/ornot';
my $what = 'no'; # Highlighter OK

but fact remains syntax highlighter is broken in this case.

0 Likes

Subl3: Perl Syntax Highlightning broken after //= Operator
#2

looks like it is related to this:

0 Likes

#3

Might be, but it actually works fine if you use || instead of // as operator.

0 Likes