Add some workaround for #248

This commit is contained in:
mattn
2015-01-08 14:23:34 +09:00
parent a9b29f786e
commit 8b9bcac7a0
2 changed files with 6 additions and 1 deletions

View File

@@ -1769,6 +1769,7 @@ let s:emmet_settings = {
\ 'block_elements': 'address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,link,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul,h1,h2,h3,h4,h5,h6', \ 'block_elements': 'address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,link,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul,h1,h2,h3,h4,h5,h6',
\ '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,select,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,select,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,
\ }, \ },
\ 'htmldjango': { \ 'htmldjango': {
\ 'extends': 'html', \ 'extends': 'html',

View File

@@ -509,9 +509,13 @@ function! emmet#lang#html#toString(settings, current, type, inline, filters, ite
let inner = substitute(inner, "\n" . escape(indent, '\') . '$', '', 'g') let inner = substitute(inner, "\n" . escape(indent, '\') . '$', '', 'g')
let str .= inner let str .= inner
endfor endfor
else
if settings.html.indent_blockelement && len(current_name) > 0 && stridx(','.settings.html.inline_elements.',', ','.current_name.',') == -1
let str .= "\n" . indent . '${cursor}' . "\n"
else else
let str .= '${cursor}' let str .= '${cursor}'
endif endif
endif
if dr if dr
let str .= "\n" let str .= "\n"
endif endif