Skip to content

Commit

Permalink
Merge pull request #102 from kevcenteno/js-speed-fix
Browse files Browse the repository at this point in the history
Fix speed issue with Javascript plugin(s)
  • Loading branch information
acidjazz authored Apr 7, 2017
2 parents 84295c0 + 1faa829 commit ddc5592
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion syntax/pug.vim
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ syn match pugComment '\(\s\+\|^\)\/\/.*$' contains=pugCommentTodo,@Spell
syn region pugCommentBlock start="\z(\s\+\|^\)\/\/.*$" end="^\%(\z1\s\|\s*$\)\@!" contains=pugCommentTodo,@Spell keepend
syn region pugHtmlConditionalComment start="<!--\%(.*\)>" end="<!\%(.*\)-->" contains=pugCommentTodo,@Spell
syn region pugAngular2 start="(" end=")" contains=htmlEvent
syn region pugAttributes matchgroup=pugAttributesDelimiter start="(" end=")" contained contains=@htmlJavascript,pugHtmlArg,pugAngular2,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@pugComponent
syn region pugJavascriptString start=+"+ skip=+\\\("\|$\)+ end=+"\|$+ contained
syn region pugJavascriptString start=+'+ skip=+\\\('\|$\)+ end=+'\|$+ contained
syn region pugAttributes matchgroup=pugAttributesDelimiter start="(" end=")" contained contains=pugJavascriptString,pugHtmlArg,pugAngular2,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@pugComponent
syn match pugClassChar "\." containedin=htmlTagName nextgroup=pugClass
syn match pugBlockExpansionChar ":\s\+" contained nextgroup=pugTag,pugClassChar,pugIdChar
syn match pugIdChar "#[[{]\@!" contained nextgroup=pugId
Expand Down Expand Up @@ -99,6 +101,7 @@ hi def link pugCommentTodo Todo
hi def link pugComment Comment
hi def link pugCommentBlock Comment
hi def link pugHtmlConditionalComment pugComment
hi def link pugJavascriptString String

let b:current_syntax = "pug"

Expand Down

0 comments on commit ddc5592

Please sign in to comment.