Closed Gumnos closed 5 years ago
On deeper inspection, this seems to be caused by paragraphs containing links. html2text.HTML2Text.optwrap()
calls html2text.utils.skipwrap()
. In the RSS item's paragraphs in question, they contain links, so skipwrap()
instructs optwrap()
not to wrap the paragraph at all. Looks like the immediate solution is to add a configuration option for html2text.config.WRAP_LINKS
to let html2text
wrap paragraphs containing links. A better solution might be to make upstream html2text
smarter about wrapping links.
Grr, this appears to be an upstream issue withhtml2text
not producing wrapped results for lists (see html2text.utils.py:194-199
for the code in question) . Sorry for the noise.
Previously I could add
to my config file and it would wrap as expected. I recently did a fresh install on a new machine and it looks like the underlying
html2text
library has possibly changed how theBODY_WIDTH
is handled so it no longer wraps output. The fix would require some sort of tweak in theconfig.py
file.In case it matters, I have it also configured to do
use-8bit = True
.