From c6e018b386cc1027b1a65397b19722291da84aa9 Mon Sep 17 00:00:00 2001 From: joaumg Date: Fri, 31 May 2019 06:27:55 -0300 Subject: [PATCH] fix(regression): form interpreted as pugScriptLoopRegion On the commit 862314141a689770ecf85076a8fa36600ecb66f7, there was added the `each` keyword to the vim-pug syntax/plug.vim However, it doesn't check if there is a `m` after `for`, making `form` a `pugScriptLoopRegion` instead of a `htmlTagName` --- syntax/pug.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/pug.vim b/syntax/pug.vim index 6707987..727d444 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