diff options
-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), |