From b6915a1ebe377e09422a388663fd3b95c7db3714 Mon Sep 17 00:00:00 2001 From: Arnaud Vergnet Date: Fri, 26 Jun 2020 18:22:00 +0200 Subject: [PATCH] Improved HTML parsing --- src/components/Overrides/CustomHTML.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/Overrides/CustomHTML.js b/src/components/Overrides/CustomHTML.js index 340717b..4e28948 100644 --- a/src/components/Overrides/CustomHTML.js +++ b/src/components/Overrides/CustomHTML.js @@ -21,15 +21,25 @@ class CustomHTML extends React.Component { return {children}; }; + getListBullet = (htmlAttribs, children, convertedCSSStyles, passProps) => { + return ( + - + ); + }; + render() { // Surround description with p to allow text styling if the description is not html return " + this.props.html + "

"} renderers={{ p: this.getBasicText, + li: this.getBasicText, }} + listsPrefixesRenderers={{ + ul: this.getListBullet + }} + ignoredTags={['img']} ignoredStyles={['color', 'background-color']} - onLinkPress={this.openWebLink}/>; } }