atom / language-perl

Perl package for Atom
Other
25 stars 32 forks source link

Properties named 'q' trigger the q quote highlighting #7

Closed darkliquid closed 9 years ago

darkliquid commented 9 years ago

Atom 0.179.0 OSX, language-perl 0.10.0

In the following example, the portion of the code from q; until the next ; is erroneously highlighted as a quoted string - specifically the 2nd print keyword is highlighted as a string instead of like the other prints.

sub q() {}
my $test = {};
bless $test;
print $test->q;
# this is some code that should not be string highlighted
print "end";

screencapture at thu feb 19 09 54 46 gmt 2015

Interestingly, the highlighter github uses as well seems to make this same mistake.

pchaigno commented 9 years ago

Interestingly, the highlighter github uses as well seems to make this same mistake.

@darkliquid That's because this grammar was converted from textmate/perl.tmbundle which GitHub uses for Perl syntax highlighting (see github/linguist for more information). I opened an issue there.