node-html-to-text
node-html-to-text copied to clipboard
Handle lists with line breaks between items
Bug:
if ordered list or unordered list contains line breaks <br> those will be count as list items <li> and they cause extra (empty) numbered (or bulleted) items.
e.g.
<ol><br><li>foo</li><br><li>bar</li></ol>
would output
1.
2. foo
3.
4. bar
which seems wrong to be.
Fix:
handle only <li> children of the ordered and unordered lists.