summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblackbird <devnull@localhost>2007-04-21 12:28:54 +0200
committerblackbird <devnull@localhost>2007-04-21 12:28:54 +0200
commit5b9c141a1a5fa1f73fd18b07b8e71ee6f8553b7a (patch)
tree51b0ce32658edf7538d03e362f6010fac8f9e4c4
parent71aa860d00e1bebc3489ee5355650f6d3b4f979a (diff)
downloadpygments-5b9c141a1a5fa1f73fd18b07b8e71ee6f8553b7a.tar.gz
[svn] {% filter %} in pygments has now extra rules for the first name which is a filter not a variable
-rw-r--r--pygments/lexers/templates.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py
index fc4a54f0..1e28bbd2 100644
--- a/pygments/lexers/templates.py
+++ b/pygments/lexers/templates.py
@@ -223,6 +223,10 @@ class DjangoLexer(RegexLexer):
bygroups(Comment.Preproc, Text, Keyword, Text, Comment.Preproc,
Text, Comment.Preproc, Text, Keyword, Text,
Comment.Preproc)),
+ # filter blocks
+ (r'(\{\%)(\-?\s*)(filter)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)',
+ bygroups(Comment.Preproc, Text, Keyword, Text, Name.Function),
+ 'block'),
(r'(\{\%)(\-?\s*)([a-zA-Z_][a-zA-Z0-9_]*)',
bygroups(Comment.Preproc, Text, Keyword), 'block'),
(r'\{', Other)