diff --git a/lib/puppet-syntax/hiera.rb b/lib/puppet-syntax/hiera.rb index 2a8fdfe..d96f43d 100644 --- a/lib/puppet-syntax/hiera.rb +++ b/lib/puppet-syntax/hiera.rb @@ -122,7 +122,7 @@ def check(filelist) # You can do string concatenation outside of {}: # "%{lookup('this_is_ok')}:3306" def check_broken_function_call(element) - 'string after a function call but before `}` in the value' if element.is_a?(String) && /%{.+\('.*'\).+}/.match?(element) + 'string after a function call but before `}` in the value' if element.is_a?(String) && /%{[^}]+\('[^}]*'\)[^}\s]+}/.match?(element) end # gets a hash or array, returns all keys + values as array