summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-10-07 11:21:10 +0200
committerGeorg Brandl <georg@python.org>2014-10-07 11:21:10 +0200
commitabae5a16c927814de3b3f6f45bc0df94cf7ec9fa (patch)
tree0774ce528981a6e4cbdb94d0656c4bd74ca316c6
parent554d80c14d145050512e1c1e9c7f20aa266bca83 (diff)
downloadpygments-abae5a16c927814de3b3f6f45bc0df94cf7ec9fa.tar.gz
Closes #1034: allow "-" in names for handlebars lexer
-rw-r--r--pygments/lexers/templates.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py
index 4a8a89a2..ee30b836 100644
--- a/pygments/lexers/templates.py
+++ b/pygments/lexers/templates.py
@@ -1817,16 +1817,16 @@ class HandlebarsLexer(RegexLexer):
Keyword)),
# General {{#block}}
- (r'([\#/])(\w+)', bygroups(Name.Function, Name.Function)),
+ (r'([\#/])([\w-]+)', bygroups(Name.Function, Name.Function)),
# {{opt=something}}
- (r'(\w+)(=)', bygroups(Name.Attribute, Operator)),
+ (r'([\w-]+)(=)', bygroups(Name.Attribute, Operator)),
# borrowed from DjangoLexer
(r':?"(\\\\|\\"|[^"])*"', String.Double),
(r":?'(\\\\|\\'|[^'])*'", String.Single),
(r'[a-zA-Z][\w-]*', Name.Variable),
- (r'\.\w+', Name.Variable),
+ (r'\.[\w-]+', Name.Variable),
(r"[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|"
r"0[xX][0-9a-fA-F]+[Ll]?", Number),
]