From 75293629c7c6072be3911a18f1b1db6bb652d23f Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 25 Jul 2015 09:39:06 +0200 Subject: jinja: allow functions starting with underscores --- pygments/lexers/templates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py index 3cb73059..bfca0d38 100644 --- a/pygments/lexers/templates.py +++ b/pygments/lexers/templates.py @@ -369,7 +369,7 @@ class DjangoLexer(RegexLexer): r'with(?:(?:out)?\s*context)?|scoped|ignore\s+missing)\b', Keyword), (r'(loop|block|super|forloop)\b', Name.Builtin), - (r'[a-zA-Z][\w-]*', Name.Variable), + (r'[a-zA-Z_][\w-]*', Name.Variable), (r'\.\w+', Name.Variable), (r':?"(\\\\|\\"|[^"])*"', String.Double), (r":?'(\\\\|\\'|[^'])*'", String.Single), -- cgit v1.2.1