Skip to content

Commit 67ec1ec

Browse files
author
soliury
committed
change to origin
1 parent ad89235 commit 67ec1ec

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

lib/htmlParse.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,16 @@ var parseHtml = function (html, done) {
7777
}
7878
},
7979
ontext: function (text) {
80-
var parent = tagStack[tagStack.length - 1]
81-
pushText(parent, text)
80+
if (text == '\n') return;
81+
var parent = tagStack[tagStack.length - 1];
82+
if (!parent.children) parent.children = [];
83+
84+
parent.children.push({
85+
name: 'text',
86+
text: text,
87+
parent: parent,
88+
type: 'inline'
89+
})
8290
},
8391
onclosetag: function (name) {
8492
tagStack.pop()

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-html-render",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "A html render for react-native",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)