Skip to content

Commit 0476d4a

Browse files
committed
Improved jsTaggedTemplate performance
Another match that turns up pretty high in the list of total time spent under `syntime`
1 parent 41ae95e commit 0476d4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

syntax/javascript.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ syntax region jsTemplateVar matchgroup=jsTemplateBraces start=+${+ end=+}+
8686
syntax region jsStringD start=+"+ skip=+\\\("\|$\)+ end=+"\|$+ contains=jsSpecial,@htmlPreproc,@Spell
8787
syntax region jsStringS start=+'+ skip=+\\\('\|$\)+ end=+'\|$+ contains=jsSpecial,@htmlPreproc,@Spell
8888
syntax region jsTemplateString start=+`+ skip=+\\\(`\|$\)+ end=+`+ contains=jsTemplateVar,jsSpecial,@htmlPreproc
89-
syntax region jsTaggedTemplate start=/\k\+\(\(\n\|\s\)\+\)\?`/ end=+`+ contains=jsTemplateString keepend
89+
syntax region jsTaggedTemplate start=/\k\+\%([\n\s]\+\)\?`/ end=+`+ contains=jsTemplateString keepend
9090
syntax region jsRegexpCharClass start=+\[+ skip=+\\.+ end=+\]+ contained
9191
syntax match jsRegexpBoundary "\v%(\<@![\^$]|\\[bB])" contained
9292
syntax match jsRegexpBackRef "\v\\[1-9][0-9]*" contained

0 commit comments

Comments
 (0)