mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2025-12-07 21:24:50 +08:00
Fix syntax for template inside template
This commit is contained in:
@@ -81,15 +81,15 @@ function! s:GetIndentByContext()
|
||||
let prevline = getline(s:PrevNonBlankNonComment(v:lnum))
|
||||
let curline = getline(v:lnum)
|
||||
|
||||
if curline =~ s:block_tag
|
||||
" 0 for blocks except template as it can be nested
|
||||
if curline =~ s:block_tag && curline !~ s:template_tag
|
||||
let ind = 0
|
||||
endif
|
||||
endif
|
||||
|
||||
if prevline =~ s:block_tag
|
||||
if prevline !~ s:template_tag
|
||||
if prevline =~ s:block_tag && prevline !~ s:template_tag
|
||||
let ind = 0
|
||||
endif
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
@@ -106,7 +106,7 @@ function! s:SetSyntax(block, syntax, lang)
|
||||
let syntax_lang_name = s:GetSyntaxLangName(syntax)
|
||||
let syntax_lang = lang ? 'lang=["'']'.syntax_lang_name.'["''][^>]*' : ''
|
||||
let start = '<'.block.'[^>]*'.syntax_lang.'>'
|
||||
let end = '</'.block.'>'
|
||||
let end = '^\s*</'.block.'>'
|
||||
let syntax_group = s:GetGroupNameForHighlight(syntax)
|
||||
|
||||
execute 'syntax region '.name.' fold '
|
||||
|
||||
Reference in New Issue
Block a user