From 18e6763428f8b1c6cec5abf83d45d0790c1bf8ef Mon Sep 17 00:00:00 2001 From: Johann DAVID Date: Sun, 5 May 2019 10:50:35 +0200 Subject: [PATCH] More precise pattern for detecting for/each loops --- syntax/pug.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/pug.vim b/syntax/pug.vim index 6707987..0ca7cdf 100644 --- a/syntax/pug.vim +++ b/syntax/pug.vim @@ -69,7 +69,7 @@ syn region pugPlainFilter matchgroup=pugFilter start="^\z(\s*\):\%(sass\|less\| syn match pugScriptConditional "^\s*\<\%(if\|else\|else if\|elif\|unless\|while\|until\|case\|when\|default\)\>[?!]\@!" syn match pugScriptStatement "^\s*\<\%(each\|for\|block\|prepend\|append\|mixin\|extends\|include\)\>[?!]\@!" -syn region pugScriptLoopRegion start="^\s*\(for\|each\)" end="$" contains=pugScriptLoopKeywords +syn region pugScriptLoopRegion start="^\s*\(for\|each\)\>" end="$" contains=pugScriptLoopKeywords syn keyword pugScriptLoopKeywords contained for each in syn region pugJavascript start="^\z(\s*\)script\%(:\w\+\)\=" end="^\%(\z1\s\|\s*$\)\@!" contains=@htmlJavascript,pugJavascriptTag,pugCoffeescriptFilter keepend