diff options
| author | Matthäus G. Chajdas <dev@anteru.net> | 2021-07-18 11:25:44 +0200 |
|---|---|---|
| committer | Matthäus G. Chajdas <dev@anteru.net> | 2021-07-18 11:25:44 +0200 |
| commit | 02ba6b0f56cbc6c99d11dfae9f9a99a4b361cb75 (patch) | |
| tree | 95bce042fe36a784e0f58dc526ce1eb4735594fb /pygments | |
| parent | 93e9bf3fc4d5cc6631a510d485096d03a05d3b23 (diff) | |
| download | pygments-git-02ba6b0f56cbc6c99d11dfae9f9a99a4b361cb75.tar.gz | |
Fix #1841.
Use Comment.Single/Multiline in Mako template lexer.
Diffstat (limited to 'pygments')
| -rw-r--r-- | pygments/lexers/templates.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py index 3ac190fc..548e14af 100644 --- a/pygments/lexers/templates.py +++ b/pygments/lexers/templates.py @@ -588,12 +588,12 @@ class MakoLexer(RegexLexer): tokens = { 'root': [ (r'(\s*)(%)(\s*end(?:\w+))(\n|\Z)', - bygroups(Text, Comment.Preproc, Keyword, Other)), + bygroups(Text.Whitespace, Comment.Preproc, Keyword, Other)), (r'(\s*)(%)([^\n]*)(\n|\Z)', - bygroups(Text, Comment.Preproc, using(PythonLexer), Other)), + bygroups(Text.Whitespace, Comment.Preproc, using(PythonLexer), Other)), (r'(\s*)(##[^\n]*)(\n|\Z)', - bygroups(Text, Comment.Preproc, Other)), - (r'(?s)<%doc>.*?</%doc>', Comment.Preproc), + bygroups(Text.Whitespace, Comment.Single, Text.Whitespace)), + (r'(?s)<%doc>.*?</%doc>', Comment.Multiline), (r'(<%)([\w.:]+)', bygroups(Comment.Preproc, Name.Builtin), 'tag'), (r'(</%)([\w.:]+)(>)', |
