From b351be093f4674c4ddaab441420afab5d6ca6013 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 2 Feb 2016 10:36:04 +0100 Subject: Closes #1197: allow maps as function arguments in Velocity. --- pygments/lexers/templates.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pygments') 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'), ] -- cgit v1.2.1