|
|
|
@ -138,15 +138,7 @@ module.exports = config => { |
|
|
|
!model.type && (model.type = 'text'); |
|
|
|
model.content = firstChild.nodeValue; |
|
|
|
} else { |
|
|
|
const parsed = this.parseNode(node); |
|
|
|
// From: <div> <span>TEST</span> </div> <-- span is text type
|
|
|
|
// TO: <div> TEST </div> <-- 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); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|