remarkablemark / html-react-parser

📝 HTML to React parser.
https://b.remarkabl.org/html-react-parser
MIT License
2.07k stars 129 forks source link

Nested list not rendering #1441

Open Lazy-Lad opened 2 months ago

Lazy-Lad commented 2 months ago

Expected Behavior

If we we have a list with a sublist in it it should render as it is,

  1. List item 1 a. sub item 1

Actual Behavior

  1. List item
  2. Sub item

Steps to Reproduce

Use any RTE to get the HTML code and render it using ReactHTMLParser

remarkablemark commented 2 months ago

@Lazy-Lad Can you provide a reproducible example?

mhNirob commented 1 month ago

I am getting the same issue in my project. For example, for this HTML input - <strong>Key Products</strong></p><ul><li><strong>WPManageNinja</strong></li><li><strong>FluentForms</strong></li><li><strong>Ninja Tables</strong></li></ul><p><br></p><p>

Expected output:

Screenshot 2024-07-08 at 11 09 26 AM

But the output I am getting:

Screenshot 2024-07-08 at 11 10 38 AM
remarkablemark commented 1 month ago

@mhNirob can you provide a reproducible example using StackBlitz?

mhNirob commented 1 month ago

@remarkablemark couldn't reproduce this issue from StackBlitz. Strange! It's working fine there but not in my project. I am still trying to figure it out, I will let you know here if I find something.