Alir3z4 / html2text

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

Hard wraps break in inline links #423

Closed seanthegeek closed 3 months ago

seanthegeek commented 3 months ago

Html2text version: 2024.2.26 Python version: 3.11.12

html2test does not take inline links into account when maintaining a particular width, which causes links to be broken if the happen to extend past the width limit. html2text should break the line earlier if possible. If the link would still extend beyond the width limit, the width limit should be ignored in order to preserve the link, similar to home the width limit is currently ignored for lists.

seanthegeek commented 3 months ago

I just noticed the protect_links option in the documentation, but that doesn't seem to work as intended. I'll open a separate issue.