handle attribute in join-tag

close #379
This commit is contained in:
Yasuhiro Matsumoto
2017-07-13 01:47:17 +09:00
parent 94261d6515
commit 230f41e55b

View File

@@ -878,7 +878,7 @@ endfunction
function! emmet#lang#html#splitJoinTag() abort function! emmet#lang#html#splitJoinTag() abort
let curpos = emmet#util#getcurpos() let curpos = emmet#util#getcurpos()
while 1 while 1
let mx = '<\(/\{0,1}[a-zA-Z][a-zA-Z0-9:_\-]*\)[^>]*>' let mx = '<\(/\{0,1}[a-zA-Z][a-zA-Z0-9]*\)\%(\%(\s[a-zA-Z][a-zA-Z0-9]\+=\%([^"'' \t]\+\|"[^"]\{-}"\|''[^'']\{-}''\)\s*\)*\)\%(/\{0,1}\)>'
let pos1 = searchpos(mx, 'bcnW') let pos1 = searchpos(mx, 'bcnW')
let content = matchstr(getline(pos1[0])[pos1[1]-1:], mx) let content = matchstr(getline(pos1[0])[pos1[1]-1:], mx)
let tag_name = substitute(content, '^<\(/\{0,1}[a-zA-Z][a-zA-Z0-9:_\-]*\).*$', '\1', '') let tag_name = substitute(content, '^<\(/\{0,1}[a-zA-Z][a-zA-Z0-9:_\-]*\).*$', '\1', '')