check text node or not.

This commit is contained in:
mattn
2012-06-03 00:14:42 +09:00
parent 7b0c846018
commit 2ff5526a0c

View File

@@ -342,7 +342,7 @@ function! zencoding#lang#html#toString(settings, current, type, inline, filters,
let inner .= html
endfor
if len(current.child) == 1
if stridx(','.settings.html.inline_elements.',', ','.current.child[0].name.',') == -1
if len(current.child[0].name) > 0 && stridx(','.settings.html.inline_elements.',', ','.current.child[0].name.',') == -1
let inner = substitute(inner, "\n", "\n" . indent, 'g')
let inner = substitute(inner, indent . "$", "", 'g')
let str .= ">\n" . indent . inner . "</" . current_name . ">"