summaryrefslogtreecommitdiffstats
path: root/syntax/pug.vim
diff options
context:
space:
mode:
Diffstat (limited to 'syntax/pug.vim')
-rw-r--r--syntax/pug.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/syntax/pug.vim b/syntax/pug.vim
index c83b35c6..d393dab6 100644
--- a/syntax/pug.vim
+++ b/syntax/pug.vim
@@ -29,7 +29,8 @@ syn region javascriptParenthesisBlock start="(" end=")" contains=@htmlJavascrip
syn cluster htmlJavascript add=javascriptParenthesisBlock
syn region pugJavascript matchgroup=pugJavascriptOutputChar start="[!&]\==\|\~" skip=",\s*$" end="$" contained contains=@htmlJavascript keepend
-syn region pugJavascript matchgroup=pugJavascriptChar start="-" skip=",\s*$" end="$" contained contains=@htmlJavascript keepend
+syn region pugJavascript matchgroup=pugJavascriptChar start="\(^\|\s\)\@<=-" skip=",\s*$" end="$" contained contains=@htmlJavascript keepend
+
syn cluster pugTop contains=pugBegin,pugComment,pugHtmlComment,pugJavascript
syn match pugBegin "^\s*\%([<>]\|&[^=~ ]\)\@!" nextgroup=pugTag,pugClassChar,pugIdChar,pugPlainChar,pugJavascript,pugScriptConditional,pugScriptStatement,pugPipedText
syn match pugTag "+\?[[:alnum:]_-]\+\%(:\w\+\)\=" contained contains=htmlTagName,htmlSpecialTagName,pugJavascript nextgroup=@pugComponent