forked from VimPlug/emmet-vim
wrap normaly in last tag when don't contain "*" for wrap abbreviation.
This commit is contained in:
@@ -346,11 +346,9 @@ function! s:zen_toString_haml(settings, current, type, inline, filters, itemno,
|
|||||||
let tmp = ''
|
let tmp = ''
|
||||||
for attr in keys(current.attr)
|
for attr in keys(current.attr)
|
||||||
let val = current.attr[attr]
|
let val = current.attr[attr]
|
||||||
if current.multiplier > 1
|
|
||||||
while val =~ '\$\([^#{]\|$\)'
|
while val =~ '\$\([^#{]\|$\)'
|
||||||
let val = substitute(val, '\(\$\+\)\([^{]\|$\)', '\=printf("%0".len(submatch(1))."d", itemno+1).submatch(2)', 'g')
|
let val = substitute(val, '\(\$\+\)\([^{]\|$\)', '\=printf("%0".len(submatch(1))."d", itemno+1).submatch(2)', 'g')
|
||||||
endwhile
|
endwhile
|
||||||
endif
|
|
||||||
if attr == 'id'
|
if attr == 'id'
|
||||||
let str .= '#' . val
|
let str .= '#' . val
|
||||||
elseif attr == 'class'
|
elseif attr == 'class'
|
||||||
@@ -417,11 +415,9 @@ function! s:zen_toString_html(settings, current, type, inline, filters, itemno,
|
|||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
let val = current.attr[attr]
|
let val = current.attr[attr]
|
||||||
if current.multiplier > 1
|
|
||||||
while val =~ '\$\([^#{]\|$\)'
|
while val =~ '\$\([^#{]\|$\)'
|
||||||
let val = substitute(val, '\(\$\+\)\([^{]\|$\)', '\=printf("%0".len(submatch(1))."d", itemno+1).submatch(2)', 'g')
|
let val = substitute(val, '\(\$\+\)\([^{]\|$\)', '\=printf("%0".len(submatch(1))."d", itemno+1).submatch(2)', 'g')
|
||||||
endwhile
|
endwhile
|
||||||
endif
|
|
||||||
let tmp .= ' ' . attr . '="' . val . '"'
|
let tmp .= ' ' . attr . '="' . val . '"'
|
||||||
if s:zen_useFilter(filters, 'c')
|
if s:zen_useFilter(filters, 'c')
|
||||||
if attr == 'id' | let comment .= '#' . val | endif
|
if attr == 'id' | let comment .= '#' . val | endif
|
||||||
@@ -688,13 +684,8 @@ function! zencoding#expandAbbr(mode) range
|
|||||||
let str .= lpart . "\n"
|
let str .= lpart . "\n"
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
if len(leader)
|
let leader .= (str =~ "\n" ? "{\n" : "{") . str . "}"
|
||||||
let items = s:zen_parseIntoTree(leader, type).child
|
let items = s:zen_parseIntoTree(leader, type).child
|
||||||
let items[0].value = "{\n".str."}"
|
|
||||||
else
|
|
||||||
let items = s:zen_parseIntoTree(leader, type).child
|
|
||||||
let items[0].value = "{".str."}"
|
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
let str .= getline(a:firstline)
|
let str .= getline(a:firstline)
|
||||||
let items = s:zen_parseIntoTree(leader, type).child
|
let items = s:zen_parseIntoTree(leader, type).child
|
||||||
|
|||||||
Reference in New Issue
Block a user