don't screw up expansion if there's already an existing tag (#23)

<p>a>b_</p>

now expands to

<p><a><b>_</b></a></p>

rather than

<p>
  <a><b></b></a>
</p></p>
This commit is contained in:
Jesse Luehrs
2011-08-09 23:33:14 -05:00
committed by mattn
parent 95df77c224
commit 25ecc2ca99

View File

@@ -691,6 +691,9 @@ function! zencoding#expandAbbr(mode) range
let part = matchstr(line, '\([a-zA-Z0-9_\@:|]\+\)$')
else
let part = matchstr(line, '\(\S.*\)$')
while part =~ '<.*>'
let part = substitute(part, '<.\{-}>', '', '')
endwhile
endif
let rest = getline('.')[len(line):]
let str = part