avoid html decoding empty strings

This commit is contained in:
Evan You 2016-04-12 20:30:47 -04:00
parent fa46e8f88e
commit 9af0745779

View File

@ -37,11 +37,10 @@ export function parse (html, preserveWhiteSpace) {
currentParent = stack[stack.length - 1]
},
chars (text) {
text = decodeHTML(text)
text = currentParent.tag === 'pre'
? text
? decodeHTML(text)
: text.trim()
? text
? decodeHTML(text)
: preserveWhiteSpace
? ' '
: null