react-native-htmlview icon indicating copy to clipboard operation
react-native-htmlview copied to clipboard

Unordered List followed by Paragraph not rendering properly

Open KrisChambers opened this issue 4 years ago • 3 comments

Consider the following html: <html><body><ul><li>Item 1</li></ul><p>Paragraph</p><p>P2</p></body></html>

Expected output:

  • Item 1

Paragraph

P2

Actual output:

  • Item1Paragrah

P2

Check Android and IOs at the this Snack Link

I would expect a new paragraph to be started after the list. As is the case for html rendered in the browser.

Hacky Solution:

  1. Manually add newlines after list
  2. while (html.indexOf("ul><p") > -1) { html = html.replace("><p", ">\n\n<p"); }

KrisChambers avatar Apr 02 '21 22:04 KrisChambers

Hi, I'm also facing some issue when trying to render ul li html tags, is there any solution or workaround ?

SaruwatariSagittario avatar Apr 12 '21 09:04 SaruwatariSagittario

In my case, the workaround has been to add line breaks (<br />) to the markup. The main issue for me seems to be the formatting of the list when sandwiched between paragraphs.

KrisChambers avatar Apr 16 '21 17:04 KrisChambers

for me, a list of ul > li with many li tags breaks

Mihai-github avatar Aug 31 '23 12:08 Mihai-github