Closed alex-harvey-z3q closed 5 years ago
I worked around it using:
class foo (
Pattern[/(\d+[\.$]){4}/] $ipaddr, #/ # comment is to trick vim syntax highlighter.
) {
notice($ipaddr)
}
class { 'foo': ipaddr => '1.1.1.1.' }
I can confirm that this is happening on current master.
we probably need to add a new zone type for regular expressions
reading the current syntax hilighting code, I somehow think that this might be the issue: the puppetInstance
syntax match zone stops matching at the opening curly brace or bracket. e.g. : https://github.com/rodjek/vim-puppet/blob/master/syntax/puppet.vim#L36
so I don,t know how to fix this currently since possibly we can't have puppetInstance
"contain" the syntax match puppetRegex
since that would not make any sense. should we have a higher-level zone that actually contains puppetInstance
and then whatever is valid for values inside brackets?
@alexharv074 I've re-tested your case on the current master and I believe that the recent merger of the new syntax highlighting has fixed this issue!
I found the following code example breaks the vim syntax highlighter:
It appears in vim as: