summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@pobox.com>2009-12-07 20:47:58 -0500
committerJames Turnbull <james@lovedthanlost.net>2010-01-30 11:02:02 +1100
commitb3c363c547dd7bf8cb54c103c20f688b9944b7da (patch)
treecd8e20f996feabffea6dbc3d056b312537935549 /ext
parentf9e05a8062423cf0e4dd6dca2050a8c7d4b2e85d (diff)
downloadpuppet-b3c363c547dd7bf8cb54c103c20f688b9944b7da.tar.gz
puppet-b3c363c547dd7bf8cb54c103c20f688b9944b7da.tar.xz
puppet-b3c363c547dd7bf8cb54c103c20f688b9944b7da.zip
vim: puppetDefArguments is contained by puppetDefine
The argument list for a definition must be contained, otherwise it matches too much text. For example: define test($arg) { $foo = regsubst("$name", '(.*)', '\1') # The parentheses within the above regsubst are matched as part # of puppetDefArguments and the highlighting after is incorrect. } Marking puppetDefArguments as contained by puppetDefine fixes this. Signed-off-by: Todd Zullinger <tmz@pobox.com>
Diffstat (limited to 'ext')
-rw-r--r--ext/vim/syntax/puppet.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/vim/syntax/puppet.vim b/ext/vim/syntax/puppet.vim
index eb62b64b8..e86138a4c 100644
--- a/ext/vim/syntax/puppet.vim
+++ b/ext/vim/syntax/puppet.vim
@@ -19,7 +19,7 @@ endif
" match class/definition/node declarations
syn region puppetDefine start="^\s*\(class\|define\|node\)\s" end="{" contains=puppetDefType,puppetDefName,puppetDefArguments,puppetNodeRe
syn keyword puppetDefType class define node inherits contained
-syn region puppetDefArguments start="(" end=")" contains=puppetArgument
+syn region puppetDefArguments start="(" end=")" contained contains=puppetArgument
syn match puppetArgument "\w\+" contained
syn match puppetArgument "\$\w\+" contained
syn match puppetArgument "'[^']+'" contained