forked from VimPlug/emmet-vim
@@ -177,7 +177,7 @@ function! emmet#mergeConfig(lhs, rhs) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! emmet#newNode() abort
|
function! emmet#newNode() abort
|
||||||
return { 'name': '', 'attr': {}, 'child': [], 'snippet': '', 'basevalue': 0, 'basedirect': 1, 'multiplier': 1, 'parent': {}, 'value': '', 'pos': 0, 'important': 0, 'attrs_order': ['id', 'class'], 'block': 0 }
|
return { 'name': '', 'attr': {}, 'child': [], 'snippet': '', 'basevalue': 0, 'basedirect': 1, 'multiplier': 1, 'parent': {}, 'value': '', 'pos': 0, 'important': 0, 'attrs_order': ['id', 'class'], 'block': 0, 'empty': 0 }
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:itemno(itemno, current) abort
|
function! s:itemno(itemno, current) abort
|
||||||
|
|||||||
@@ -401,6 +401,10 @@ function! emmet#lang#html#parseIntoTree(abbr, type) abort
|
|||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
let abbr = abbr[stridx(abbr, match) + len(match):]
|
let abbr = abbr[stridx(abbr, match) + len(match):]
|
||||||
|
if abbr == '/'
|
||||||
|
let g:hoge = 1
|
||||||
|
let current.empty = 1
|
||||||
|
endif
|
||||||
|
|
||||||
if g:emmet_debug > 1
|
if g:emmet_debug > 1
|
||||||
echomsg 'str='.str
|
echomsg 'str='.str
|
||||||
@@ -562,7 +566,9 @@ function! emmet#lang#html#toString(settings, current, type, inline, filters, ite
|
|||||||
if len(comment) > 0 && ct ==# 'both'
|
if len(comment) > 0 && ct ==# 'both'
|
||||||
let str = '<!-- ' . comment . " -->\n" . str
|
let str = '<!-- ' . comment . " -->\n" . str
|
||||||
endif
|
endif
|
||||||
if stridx(','.settings.html.empty_elements.',', ','.current_name.',') != -1
|
if current.empty
|
||||||
|
let str .= ' />'
|
||||||
|
elseif stridx(','.settings.html.empty_elements.',', ','.current_name.',') != -1
|
||||||
let str .= settings.html.empty_element_suffix
|
let str .= settings.html.empty_element_suffix
|
||||||
else
|
else
|
||||||
let str .= '>'
|
let str .= '>'
|
||||||
|
|||||||
Reference in New Issue
Block a user