1. cormullion
  2. pygments-main

Commits

Tim Hatch  committed 02123e9

A quick fix for allowing hyphens in django block names (#429)

  • Participants
  • Parent commits acacb4b
  • Branches default

Comments (0)

Files changed (1)

File pygments/lexers/templates.py

View file
              r'with(?:(?:out)?\s*context)?|scoped|ignore\s+missing)\b',
              Keyword),
             (r'(loop|block|super|forloop)\b', Name.Builtin),
-            (r'[a-zA-Z][a-zA-Z0-9_]*', Name.Variable),
+            (r'[a-zA-Z][a-zA-Z0-9_-]*', Name.Variable),
             (r'\.[a-zA-Z0-9_]+', Name.Variable),
             (r':?"(\\\\|\\"|[^"])*"', String.Double),
             (r":?'(\\\\|\\'|[^'])*'", String.Single),