Skip to content

Commit 4d54f3a

Browse files
committed
Merge pull request #3 from soska/master
Add support for LI elements with bullets
2 parents 5d2c4aa + 7110751 commit 4d54f3a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

HTMLView.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ var {
99

1010
var LINE_BREAK = '\n'
1111
var PARAGRAPH_BREAK = '\n\n'
12+
var BULLET = ' \u2022 '
1213

1314
function htmlToElement(rawHtml, opts, done) {
1415
function domToElement(dom, parent) {
@@ -37,8 +38,10 @@ function htmlToElement(rawHtml, opts, done) {
3738
return (
3839
<Text key={index} onPress={linkPressHandler}>
3940
{node.name == 'pre' ? LINE_BREAK : null}
41+
{node.name == 'li' ? BULLET : null}
4042
{domToElement(node.children, node)}
4143
{node.name == 'br' ? LINE_BREAK : null}
44+
{node.name == 'li' ? LINE_BREAK : null}
4245
{node.name == 'p' && index < list.length-1 ? PARAGRAPH_BREAK : null}
4346
</Text>
4447
)

0 commit comments

Comments
 (0)