Closed santsys closed 3 years ago
Given the HTML:
<ul><li><p>Before Strong <strong>Test 1:<strong> After Strong</p><ul><li>test 2</li></ul></li></ul>
the parsed output is:
<ul>Before Strong <strong>Test 1:</strong> After Strong<ul><li>test 2</li></ul></ul>
I would expect the li elements to be properly parsed and included...
li
Sample code:
const parser = require('node-html-parser') const html = '<ul><li><p>Before Strong <strong>Test 1:<strong> After Strong</p><ul><li>test 2</li></ul></li></ul>' const parsedContent = parser.parse(html, {}) console.log(parsedContent.toString())
Looks like your HTML is invalid. strong isn't closed. Please try with valid HTML and let us know if it's still not working.
strong
@nonara - :( - Good catch! my mistake there!
Given the HTML:
the parsed output is:
I would expect the
li
elements to be properly parsed and included...Sample code: