diff options
-rw-r--r-- | pygments/lexers/templates.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py index 89fce87d..6921bdb2 100644 --- a/pygments/lexers/templates.py +++ b/pygments/lexers/templates.py @@ -237,7 +237,8 @@ class DjangoLexer(RegexLexer): (r'(is)(\s+)(not)?(\s+)?([a-zA-Z_][a-zA-Z0-9_]*)', bygroups(Keyword, Text, Keyword, Text, Name.Function)), (r'(_|(?:true|false|undefined|null))\b', Keyword.Pseudo), - (r'(in|as|reversed|recursive|not|and|or|with|is|if|else)\b', Keyword), + (r'(in|as|reversed|recursive|not|and|or|is|if|else|import|' + r'with(?:(?:out)?\s*context)?)\b', Keyword), (r'(loop|block|forloop)\b', Name.Builtin), (r'[a-zA-Z][a-zA-Z0-9_]*', Name.Variable), (r'\.[a-zA-Z0-9_]+', Name.Variable), |