File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -76,11 +76,19 @@ syn match htmlArg "[@#v:a-z][-:.0-9_a-z]*\>" contained
7676" Prevent 0 lenght vue dynamic attributes from (:id="") from overflowing from
7777" the area described by two quotes ("" or '') this works because syntax
7878" defined earlier in the file have priority.
79- syn match htmlString / \(\( [@#:]\| v-\) [-:.0-9_a-z]*=\)\@ <=["']\{ 2\} / containedin =ALLBUT,htmlComment
79+ syn match htmlString / \(\( [@#:]\| v-\) [-:.0-9_a-z]*=\)\@ <=""/ containedin =ALLBUT,htmlComment
80+ syn match htmlString / \(\( [@#:]\| v-\) [-:.0-9_a-z]*=\)\@ <=''/ containedin =ALLBUT,htmlComment
8081
8182" 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
83+
84+ " for mustaches quotes (`{{` and `}}`)
8385syn region vueJavascriptInTemplate matchgroup =htmlSpecialChar start =/ {{/ keepend end =/ }}/ contains =@jsAll containedin =ALLBUT,htmlComment
86+ " for double quotes (") and for single quotes (')
87+ syn region vueJavascriptInTemplate start =/ \(\( [@#:]\| v-\) [-:.0-9_a-z]*=\)\@ <="/ ms =e + 1 keepend end =/ "/ me =s - 1 contains =@jsAll containedin =ALL
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.
8492
8593syntax sync fromstart
8694
You can’t perform that action at this time.
0 commit comments