Alir3z4 / html2text

Convert HTML to Markdown-formatted text.
alir3z4.github.io/html2text/
GNU General Public License v3.0
1.76k stars 270 forks source link

Unnecessary spaces around <b></b> #324

Closed vyahhi closed 3 years ago

vyahhi commented 4 years ago

The html code X<b>one</b>, two is translated into X **one** , two\n\n, but should be translated into X**one**, two\n\n instead (without spaces around one).

import html2text
h = html2text.HTML2Text()
h.handle('X<b>one</b>, two')
snarfed commented 3 years ago

Also happens with other inline tags, eg (<em>foo</em> bar is translated to ( __foo__ bar.