MadcapJake / language-perl6fe

»ö« Atom Perl 6 Support - Forgotten Edition »ö«
https://github.com/perl6/atom-language-perl6
Other
16 stars 3 forks source link

Broken highlight with escaped '{' in quoted strings #15

Closed zoffixznet closed 8 years ago

zoffixznet commented 8 years ago

This sample code fails to highlight correctly:

my $x = "  \{  ";
say "Alright!";

Even though the { is escaped, it's treated as embedded Perl 6 code in the string, and since there's no closing }, the highlight continues all the way to the second line and incorrectly highlights it as part of the string.

Workaround

Until this issue is fixed, a workaround is possible by adding a comment with }" after it, as in:

my $x = "  \{  "; # }"
say "Alright!";
zoffixznet commented 8 years ago

Thanks a lot! Works like a charm now.