summaryrefslogtreecommitdiffstats
path: root/syntax/pug.vim
diff options
context:
space:
mode:
Diffstat (limited to 'syntax/pug.vim')
-rw-r--r--syntax/pug.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/syntax/pug.vim b/syntax/pug.vim
index d8416a88..992fef64 100644
--- a/syntax/pug.vim
+++ b/syntax/pug.vim
@@ -34,8 +34,8 @@ syn cluster pugTop contains=pugBegin,pugComment,pugHtmlComment,pugJavascript
syn match pugBegin "^\s*\%([<>]\|&[^=~ ]\)\@!" nextgroup=pugTag,pugClassChar,pugIdChar,pugPlainChar,pugJavascript,pugScriptConditional,pugScriptStatement,pugPipedText
syn match pugTag "+\?\w\+\%(:\w\+\)\=" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@pugComponent
syn cluster pugComponent contains=pugAttributes,pugIdChar,pugBlockExpansionChar,pugClassChar,pugPlainChar,pugJavascript,pugTagBlockChar,pugTagInlineText
-syn match pugComment '\s*\/\/.*$'
-syn region pugCommentBlock start="\z(\s*\)\/\/.*$" end="^\%(\z1\s\|\s*$\)\@!" keepend
+syn match pugComment '\(\s\+\|^\)\/\/.*$'
+syn region pugCommentBlock start="\z(\s\+\|^\)\/\/.*$" end="^\%(\z1\s\|\s*$\)\@!" keepend
syn region pugHtmlConditionalComment start="<!--\%(.*\)>" end="<!\%(.*\)-->"
syn region pugAttributes matchgroup=pugAttributesDelimiter start="(" end=")" contained contains=@htmlJavascript,pugHtmlArg,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@pugComponent
syn match pugClassChar "\." contained nextgroup=pugClass