From 71107514fa9f86d881848114a08b26ba35e50073 Mon Sep 17 00:00:00 2001 From: Armando Sosa Date: Wed, 10 Jun 2015 11:00:36 -0500 Subject: [PATCH] Add support for LI elements with bullets --- HTMLView.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/HTMLView.js b/HTMLView.js index 3369cf0..a3e9672 100644 --- a/HTMLView.js +++ b/HTMLView.js @@ -9,6 +9,7 @@ var { var LINE_BREAK = '\n' var PARAGRAPH_BREAK = '\n\n' +var BULLET = ' \u2022 ' function htmlToElement(rawHtml, opts, done) { function domToElement(dom, parent) { @@ -37,8 +38,10 @@ function htmlToElement(rawHtml, opts, done) { return ( {node.name == 'pre' ? LINE_BREAK : null} + {node.name == 'li' ? BULLET : null} {domToElement(node.children, node)} {node.name == 'br' ? LINE_BREAK : null} + {node.name == 'li' ? LINE_BREAK : null} {node.name == 'p' && index < list.length-1 ? PARAGRAPH_BREAK : null} )