atom / language-perl

Perl package for Atom
Other
25 stars 32 forks source link

Multiline RegEx clobbers highlighting #47

Closed Alhadis closed 9 years ago

Alhadis commented 9 years ago

Observe:

my $line;
while(<>){
    chomp;
    $line =     $_;

    # Delete control characters
    $line =~    s/[
        \x{00}-\x{08}
    ]//gx;

    say $line;
}

Becomes: figure-1

Adding or removing the /gx modifiers has no impact on the overzealous highlighting, either.

System specs:

I've noticed that highlighting won't spill across lines if there's at least one extra delimiter on the first line.

For instance, this is okay: figure-2

But not this: figure-3

Fank commented 9 years ago

Thanks for reporting, I located the problem and fixed it in the attached pull request.