diff options
author | gbrandl <devnull@localhost> | 2009-01-04 15:30:48 +0100 |
---|---|---|
committer | gbrandl <devnull@localhost> | 2009-01-04 15:30:48 +0100 |
commit | 3f16a7589e7d3d9aac7e247e8185197ee0be45b1 (patch) | |
tree | 75d5227a47db1f03012eacfccbdf83fe8db70c18 | |
parent | 778e736ce9d0b19632cf2f18e216b12e2001d390 (diff) | |
download | pygments-3f16a7589e7d3d9aac7e247e8185197ee0be45b1.tar.gz |
Fix missing escaping of # in verbose regex.
-rw-r--r-- | pygments/lexers/templates.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py index c1519d8d..fe062a18 100644 --- a/pygments/lexers/templates.py +++ b/pygments/lexers/templates.py @@ -424,17 +424,17 @@ class MakoLexer(RegexLexer): (r'(\$\{)(.*?)(\})', bygroups(Comment.Preproc, using(PythonLexer), Comment.Preproc)), (r'''(?sx) - (.+?) # anything, followed by: + (.+?) # anything, followed by: (?: - (?<=\n)(?=%|##) | # an eval or comment line - (?=#\*) | # multiline comment - (?=</?%) | # a python block - # call start or end - (?=\$\{) | # a substitution + (?<=\n)(?=%|\#\#) | # an eval or comment line + (?=\#\*) | # multiline comment + (?=</?%) | # a python block + # call start or end + (?=\$\{) | # a substitution (?<=\n)(?=\s*%) | - # - don't consume - (\\\n) | # an escaped newline - \Z # end of string + # - don't consume + (\\\n) | # an escaped newline + \Z # end of string ) ''', bygroups(Other, Operator)), (r'\s+', Text), |