According to the documentation, this should protect URLs from line breaks, but it does not. It only places angle brackets around the URLs, which is not helpful. Currently the only way to truly avoid line breaks in links is to either use reference-style links, or set body_width to 0, both of which make ugly markdown documents. It would be better if protect_links would allow links to extend beyond the body width, as the documentation implies.
Html2text version: 2024.2.26 Python version: 3.11.12
According to the documentation, this should protect URLs from line breaks, but it does not. It only places angle brackets around the URLs, which is not helpful. Currently the only way to truly avoid line breaks in links is to either use reference-style links, or set
body_width
to0
, both of which make ugly markdown documents. It would be better ifprotect_links
would allow links to extend beyond the body width, as the documentation implies.