aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-12-23 00:54:45 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-12-23 00:54:45 +0000
commit3fc095f443b1ebcc05cc2eb2ce0c8ac6a02dbf80 (patch)
tree93c64d338b381251ed71934f43d3fcbac70477a8 /lib
parentd21cc313dc02ced665cc2d72131a6f11d6459f16 (diff)
downloadexternal_python_mako-3fc095f443b1ebcc05cc2eb2ce0c8ac6a02dbf80.tar.gz
external_python_mako-3fc095f443b1ebcc05cc2eb2ce0c8ac6a02dbf80.tar.bz2
external_python_mako-3fc095f443b1ebcc05cc2eb2ce0c8ac6a02dbf80.zip
more highlighting tweaks
Diffstat (limited to 'lib')
-rw-r--r--lib/mako/ext/pygmentplugin.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/mako/ext/pygmentplugin.py b/lib/mako/ext/pygmentplugin.py
index 20ff558..4526092 100644
--- a/lib/mako/ext/pygmentplugin.py
+++ b/lib/mako/ext/pygmentplugin.py
@@ -24,8 +24,10 @@ class MakoLexer(RegexLexer):
bygroups(Text, Comment.Preproc, Keyword, Other)),
(r'(\s*)(\%)([^\n]*)(\n|\Z)',
bygroups(Text, Comment.Preproc, using(PythonLexer), Other)),
- (r'(<%)(def|call)', bygroups(Comment.Preproc, Name.Builtin), 'tag'),
- (r'(</%)(def|call)(>)', bygroups(Comment.Preproc, Name.Builtin, Comment.Preproc)),
+ (r'(\s*)(#[^\n]*)(\n|\Z)',
+ bygroups(Text, Comment.Preproc, Other)),
+ (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'(\$\{)(.*?)(\})',
@@ -53,7 +55,6 @@ class MakoLexer(RegexLexer):
'tag': [
(r'((?:\w+)\s*=)\s*(".*?")',
bygroups(Name.Attribute, String)),
- #(r'[a-zA-Z0-9_:-]+\s*=', Name.Attribute, 'attr'),
(r'/?\s*>', Comment.Preproc, '#pop'),
(r'\s+', Text),
],