forked from VimPlug/emmet-vim
@@ -1869,6 +1869,7 @@ let s:emmet_settings = {
|
|||||||
\ 'inline_elements': 'a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,small,span,strike,strong,sub,sup,textarea,tt,u,var',
|
\ 'inline_elements': 'a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,small,span,strike,strong,sub,sup,textarea,tt,u,var',
|
||||||
\ 'empty_element_suffix': g:emmet_html5 ? '>' : ' />',
|
\ 'empty_element_suffix': g:emmet_html5 ? '>' : ' />',
|
||||||
\ 'indent_blockelement': 0,
|
\ 'indent_blockelement': 0,
|
||||||
|
\ 'block_all_childless': 0,
|
||||||
\ },
|
\ },
|
||||||
\ 'elm': {
|
\ 'elm': {
|
||||||
\ 'indentation': ' ',
|
\ 'indentation': ' ',
|
||||||
|
|||||||
@@ -594,7 +594,7 @@ function! emmet#lang#html#toString(settings, current, type, inline, filters, ite
|
|||||||
if nc > 0
|
if nc > 0
|
||||||
for n in range(nc)
|
for n in range(nc)
|
||||||
let child = current.child[n]
|
let child = current.child[n]
|
||||||
if child.multiplier > 1 || (child.multiplier == 1 && len(child.child) > 0 && stridx(','.settings.html.inline_elements.',', ','.current_name.',') == -1)
|
if child.multiplier > 1 || (child.multiplier == 1 && len(child.child) > 0 && stridx(','.settings.html.inline_elements.',', ','.current_name.',') == -1) || settings.html.block_all_childless
|
||||||
let str .= "\n" . indent
|
let str .= "\n" . indent
|
||||||
let dr = 1
|
let dr = 1
|
||||||
elseif len(current_name) > 0 && stridx(','.settings.html.inline_elements.',', ','.current_name.',') == -1
|
elseif len(current_name) > 0 && stridx(','.settings.html.inline_elements.',', ','.current_name.',') == -1
|
||||||
@@ -613,7 +613,7 @@ function! emmet#lang#html#toString(settings, current, type, inline, filters, ite
|
|||||||
let str .= inner
|
let str .= inner
|
||||||
endfor
|
endfor
|
||||||
else
|
else
|
||||||
if settings.html.indent_blockelement && len(current_name) > 0 && stridx(','.settings.html.inline_elements.',', ','.current_name.',') == -1
|
if settings.html.indent_blockelement && len(current_name) > 0 && stridx(','.settings.html.inline_elements.',', ','.current_name.',') == -1 || settings.html.block_all_childless
|
||||||
let str .= "\n" . indent . '${cursor}' . "\n"
|
let str .= "\n" . indent . '${cursor}' . "\n"
|
||||||
else
|
else
|
||||||
let str .= '${cursor}'
|
let str .= '${cursor}'
|
||||||
|
|||||||
Reference in New Issue
Block a user