Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix #4615 - vim highlighting fails on slashes and colons.

When a regexp is used in a selector, vim shouldn't choke if more than one slash
is found on the same line.

This patch also adds support for colons in attribute names.
  • Loading branch information...
commit 60069641a7b1a223be5210e2d1229651e9ab65e9 1 parent f0e41e2
Marc Fournier mfournier authored jamtur01 committed

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. +3 3 syntax/puppet.vim
6 syntax/puppet.vim
@@ -57,14 +57,14 @@ syn region puppetFunction start="^\s*\(alert\|crit\|debug\|emerg\|err\|fai
57 57 " rvalues
58 58 syn region puppetFunction start="^\s*\(defined\|file\|fqdn_rand\|generate\|inline_template\|regsubst\|sha1\|shellquote\|split\|sprintf\|tagged\|template\|versioncmp\)\s*(" end=")" contained contains=puppetString
59 59
60   -syn match puppetVariable "$\w\+"
61   -syn match puppetVariable "${\w\+}"
  60 +syn match puppetVariable "$[a-zA-Z0-9_:]\+"
  61 +syn match puppetVariable "${[a-zA-Z0-9_:]\+}"
62 62
63 63 " match anything between simple/double quotes.
64 64 " don't match variables if preceded by a backslash.
65 65 syn region puppetString start=+'+ skip=+\\\\\|\\'+ end=+'+
66 66 syn region puppetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=puppetVariable,puppetNotVariable
67   -syn match puppetString "/.*/"
  67 +syn match puppetString "/[^/]*/"
68 68 syn match puppetNotVariable "\\$\w\+" contained
69 69 syn match puppetNotVariable "\\${\w\+}" contained
70 70

0 comments on commit 6006964

Please sign in to comment.
Something went wrong with that request. Please try again.