aaronsw / html2text

Convert HTML to Markdown-formatted text.
http://www.aaronsw.com/2002/html2text/
GNU General Public License v3.0
2.57k stars 410 forks source link

Trailing line break in list element should be ignored #106

Open dmauro opened 7 years ago

dmauro commented 7 years ago

Give the following HTML:

<ul>
    <li>Item 1 <br /></li>
    <li>Item 2</li>
</ul>

the following Markdown will be generated:

* Item 1 \n\n* Item 2

Which will actually be interpreted as two distinct unordered lists instead of one list with two entries. It seems that removing trailing line breaks from list items would make for a better semantic translation.