atom / language-perl

Perl package for Atom
Other
25 stars 32 forks source link

Fix highlighting for substitutions using braces as delimiters. #3

Closed jrkettle closed 10 years ago

jrkettle commented 10 years ago

The end regex was matching on the open brace in the lookahead.

kevinsawicki commented 10 years ago

Can you include a perl snippet that exhibits the bad behavior? Thanks

jrkettle commented 10 years ago
s{foo.*}{bar} 
s[foo.*][bar]

The first regex won't have any highlighting. The problem looks worse if you include a single/double quote inside the regex. Everything after that quote is treated as a string until the next unmatched single/quote.

kevinsawicki commented 10 years ago

Great, thanks for this :+1: