node-html-to-text icon indicating copy to clipboard operation
node-html-to-text copied to clipboard

Handle lists with line breaks between items

Open t0v opened this issue 7 years ago • 0 comments

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.

t0v avatar Oct 10 '18 17:10 t0v