diff --git a/lib/mako/ext/pygmentplugin.py b/lib/mako/ext/pygmentplugin.py index cdd61b832fba66ec4e362b0f26b57db8bf187cf6..3989c3d16c6f9b3f43f343a3b070bae00f4260d1 100644 --- a/lib/mako/ext/pygmentplugin.py +++ b/lib/mako/ext/pygmentplugin.py @@ -24,15 +24,15 @@ class MakoLexer(RegexLexer): bygroups(Text, Comment.Preproc, Keyword, Other)), (r'(\s*)(\%)([^\n]*)(\n|\Z)', bygroups(Text, Comment.Preproc, using(PythonLexer), Other)), - (r'(\s*)(#[^\n]*)(\n|\Z)', + (r'(\s*)(##[^\n]*)(\n|\Z)', bygroups(Text, Comment.Preproc, Other)), + (r'''(?s)\#\*.*?\*\#''', Comment.Preproc), (r'(<%)(def|call|namespace|text)', bygroups(Comment.Preproc, Name.Builtin), 'tag'), (r'(</%)(def|call|namespace|text)(>)', bygroups(Comment.Preproc, Name.Builtin, Comment.Preproc)), (r'<%(?=(include|inherit|namespace|page))', Comment.Preproc, 'ondeftags'), (r'(<%(?:!?))(.*?)(%>)(?s)', bygroups(Comment.Preproc, using(PythonLexer), Comment.Preproc)), (r'(\$\{)(.*?)(\})', bygroups(Comment.Preproc, using(PythonLexer), Comment.Preproc)), - (r'''\#\*.*?\*\#''', Comment.Preproc), (r'''(?sx) (.+?) # anything, followed by: (?: