From 4a170af46ca045f24f289f28b596eeb116577c5c Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Fri, 1 Dec 2017 03:29:28 +0100 Subject: [PATCH] Stop removing ``s. Fixes #291 and #341 --- src/parser/model/ParserHtml.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/parser/model/ParserHtml.js b/src/parser/model/ParserHtml.js index f2e99aa7d..76de6504b 100644 --- a/src/parser/model/ParserHtml.js +++ b/src/parser/model/ParserHtml.js @@ -138,15 +138,7 @@ module.exports = config => { !model.type && (model.type = 'text'); model.content = firstChild.nodeValue; } else { - const parsed = this.parseNode(node); - // From:
TEST
<-- span is text type - // TO:
TEST
<-- div become text type - if(parsed.length == 1 && parsed[0].type == 'text' && - parsed[0].tagName == TEXT_NODE){ - model.type = 'text'; - model.content = parsed[0].content; - }else - model.components = parsed; + model.components = this.parseNode(node); } }