diff options
author | Georg Brandl <georg@python.org> | 2014-10-15 21:32:31 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-10-15 21:32:31 +0200 |
commit | 10be9bec8a7969a40d4fa3483b8317e0131b1715 (patch) | |
tree | 7047dd543253b4a5f0002c377cce59e3589a2aeb /pygments/lexers/perl.py | |
parent | 6095eb22ab78b1754aeb56d67754cc4cb401e843 (diff) | |
download | pygments-10be9bec8a7969a40d4fa3483b8317e0131b1715.tar.gz |
all lexers: fix unescaped { and } so that the "regex" module can compile our regexes
Diffstat (limited to 'pygments/lexers/perl.py')
-rw-r--r-- | pygments/lexers/perl.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/lexers/perl.py b/pygments/lexers/perl.py index c279f56d..df48e2be 100644 --- a/pygments/lexers/perl.py +++ b/pygments/lexers/perl.py @@ -163,7 +163,7 @@ class PerlLexer(RegexLexer): (r'\s+', Text), # argument declaration (r'(\([$@%]*\))(\s*)', bygroups(Punctuation, Text)), - (r'.*?{', Punctuation, '#pop'), + (r'.*?\{', Punctuation, '#pop'), (r';', Punctuation, '#pop'), ], 'cb-string': [ @@ -545,7 +545,7 @@ class Perl6Lexer(ExtendedRegexLexer): default(('#pop', 'pre-token')), ], 'token': [ - (r'}', Text, '#pop'), + (r'\}', Text, '#pop'), (r'(?<=:)(?:my|our|state|constant|temp|let).*?;', using(this)), # make sure that quotes in character classes aren't treated as strings (r'<(?:[-!?+.]\s*)?\[.*?\]>', String.Regex), |