summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2009-01-04 15:30:48 +0100
committergbrandl <devnull@localhost>2009-01-04 15:30:48 +0100
commit3f16a7589e7d3d9aac7e247e8185197ee0be45b1 (patch)
tree75d5227a47db1f03012eacfccbdf83fe8db70c18
parent778e736ce9d0b19632cf2f18e216b12e2001d390 (diff)
downloadpygments-3f16a7589e7d3d9aac7e247e8185197ee0be45b1.tar.gz
Fix missing escaping of # in verbose regex.
-rw-r--r--pygments/lexers/templates.py18
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),