diff options
author | Georg Brandl <georg@python.org> | 2016-02-02 10:36:04 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2016-02-02 10:36:04 +0100 |
commit | b351be093f4674c4ddaab441420afab5d6ca6013 (patch) | |
tree | f407c0884111db8dbcb79147fb65d3e716da7cb4 /pygments | |
parent | bfef5365c04c3457c3df496cb41f8b81a18102a9 (diff) | |
download | pygments-b351be093f4674c4ddaab441420afab5d6ca6013.tar.gz |
Closes #1197: allow maps as function arguments in Velocity.
Diffstat (limited to 'pygments')
-rw-r--r-- | pygments/lexers/templates.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py index 1f2322cc..3575260e 100644 --- a/pygments/lexers/templates.py +++ b/pygments/lexers/templates.py @@ -251,7 +251,7 @@ class VelocityLexer(RegexLexer): 'funcparams': [ (r'\$\{?', Punctuation, 'variable'), (r'\s+', Text), - (r',', Punctuation), + (r'[,:]', Punctuation), (r'"(\\\\|\\"|[^"])*"', String.Double), (r"'(\\\\|\\'|[^'])*'", String.Single), (r"0[xX][0-9a-fA-F]+[Ll]?", Number), @@ -259,6 +259,8 @@ class VelocityLexer(RegexLexer): (r'(true|false|null)\b', Keyword.Constant), (r'\(', Punctuation, '#push'), (r'\)', Punctuation, '#pop'), + (r'\{', Punctuation, '#push'), + (r'\}', Punctuation, '#pop'), (r'\[', Punctuation, '#push'), (r'\]', Punctuation, '#pop'), ] |