diff --git a/autoload/emmet.vim b/autoload/emmet.vim index e344486..3169845 100644 --- a/autoload/emmet.vim +++ b/autoload/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', \ 'empty_element_suffix': g:emmet_html5 ? '>' : ' />', \ 'indent_blockelement': 0, +\ 'block_all_childless': 0, \ }, \ 'elm': { \ 'indentation': ' ', diff --git a/autoload/emmet/lang/html.vim b/autoload/emmet/lang/html.vim index d1b15f7..d8cf710 100644 --- a/autoload/emmet/lang/html.vim +++ b/autoload/emmet/lang/html.vim @@ -594,7 +594,7 @@ function! emmet#lang#html#toString(settings, current, type, inline, filters, ite if nc > 0 for n in range(nc) 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 dr = 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 endfor 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" else let str .= '${cursor}'