Merge pull request #310 from jugend/fix-join-space

fix missing space before /> on html tag join
This commit is contained in:
mattn
2016-01-01 00:06:53 +09:00

View File

@@ -827,7 +827,7 @@ function! emmet#lang#html#splitJoinTag() abort
let tag_name = substitute(content, '^<\(/\{0,1}[a-zA-Z][a-zA-Z0-9:_\-]*\).*$', '\1', '')
let block = [pos1, [pos1[0], pos1[1] + len(content) - 1]]
if content[-2:] ==# '/>' && emmet#util#cursorInRegion(block)
let content = content[:-3] . '></' . tag_name . '>'
let content = substitute(content[:-3], '\s*$', '', '') . '></' . tag_name . '>'
call emmet#util#setContent(block, content)
call setpos('.', [0, block[0][0], block[0][1], 0])
return