diff options
-rw-r--r-- | pygments/lexers/templates.py | 4 |
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) |