Browse files

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 <>
  • Loading branch information...
1 parent 502e520 commit bb95f25c74f9485e44c9d0c8d580ffd903ce2e17 @tmzullinger tmzullinger committed with jamtur01 Dec 8, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

0 comments on commit bb95f25

Please sign in to comment.