Fixes rendering type

This commit is contained in:
mattn
2013-11-26 09:58:41 +09:00
parent fb096ac4d4
commit d6ab310cc9

View File

@@ -1,7 +1,7 @@
"============================================================================= "=============================================================================
" emmet.vim " emmet.vim
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com> " Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
" Last Change: 29-Oct-2013. " Last Change: 26-Nov-2013.
let s:save_cpo = &cpo let s:save_cpo = &cpo
set cpo&vim set cpo&vim
@@ -254,7 +254,6 @@ function! emmet#toString(...)
endif endif
let inner = '' let inner = ''
if len(current.child) if len(current.child)
let render_type = emmet#getFileType(1)
for n in current.child for n in current.child
let inner .= emmet#toString(n, type, inline, filters, s:itemno(group_itemno, n), indent) let inner .= emmet#toString(n, type, inline, filters, s:itemno(group_itemno, n), indent)
endfor endfor
@@ -279,6 +278,9 @@ function! emmet#getFilters(type)
endfunction endfunction
function! emmet#getResource(type, name, default) function! emmet#getResource(type, name, default)
if exists('b:emmet_' . a:name)
return get(b:, 'emmet_' . a:name)
endif
if !has_key(s:emmet_settings, a:type) if !has_key(s:emmet_settings, a:type)
return a:default return a:default
endif endif
@@ -478,7 +480,7 @@ function! emmet#expandAbbr(mode, abbr) range
endif endif
let items = emmet#parseIntoTree(query, type).child let items = emmet#parseIntoTree(query, type).child
for item in items for item in items
let expand .= emmet#toString(item, type, 0, filters, 0, indent) let expand .= emmet#toString(item, rtype, 0, filters, 0, indent)
endfor endfor
if emmet#useFilter(filters, 'e') if emmet#useFilter(filters, 'e')
let expand = substitute(expand, '&', '\&amp;', 'g') let expand = substitute(expand, '&', '\&amp;', 'g')
@@ -533,7 +535,7 @@ function! emmet#expandAbbr(mode, abbr) range
let items = emmet#parseIntoTree(leader . "{".str."}", type).child let items = emmet#parseIntoTree(leader . "{".str."}", type).child
endif endif
for item in items for item in items
let expand .= emmet#toString(item, type, 0, filters, 0, '') let expand .= emmet#toString(item, rtype, 0, filters, 0, '')
endfor endfor
if emmet#useFilter(filters, 'e') if emmet#useFilter(filters, 'e')
let expand = substitute(expand, '&', '\&amp;', 'g') let expand = substitute(expand, '&', '\&amp;', 'g')