File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -79,8 +79,16 @@ syn match htmlArg "[@#v:a-z][-:.0-9_a-z]*\>" contained
79
79
syn match htmlString / \(\( [@#:]\| v-\) [-:.0-9_a-z]*=\)\@ <=["']\{ 2\} / containedin =ALLBUT,htmlComment
80
80
81
81
" Actually provide the JavaScript syntax highlighting.
82
- syn region vueJavascriptInTemplate start =/ \(\( [@#:]\| v-\) [-:.0-9_a-z]*=\)\@ <=["']/ ms =e + 1 keepend end =/ ["']/ me =s - 1 contains =@jsAll containedin =ALL
82
+
83
+ " for mustaches quotes (`{{` and `}}`)
83
84
syn region vueJavascriptInTemplate matchgroup =htmlSpecialChar start =/ {{/ keepend end =/ }}/ contains =@jsAll containedin =ALLBUT,htmlComment
85
+ " for double quotes (")
86
+ syn region vueJavascriptInTemplate start =/ \(\( [@#:]\| v-\) [-:.0-9_a-z]*=\)\@ <="/ ms =e + 1 keepend end =/ "/ me =s - 1 contains =@jsAll containedin =ALL
87
+ " for single quotes (')
88
+ syn region vueJavascriptInTemplate start =/ \(\( [@#:]\| v-\) [-:.0-9_a-z]*=\)\@ <='/ ms =e + 1 keepend end =/ '/ me =s - 1 contains =@jsAll containedin =ALL
89
+ " It's necessary to have both because we can't start a region with double
90
+ " quotes and it with a single quote, and removing `keepend` would result in
91
+ " side effects.
84
92
85
93
syntax sync fromstart
86
94
You can’t perform that action at this time.
0 commit comments