From 896cce17c6975c46e15991e1bb5de72e44484ba9 Mon Sep 17 00:00:00 2001 From: Sebastian Volland Date: Fri, 1 May 2015 16:21:28 +0200 Subject: [PATCH] pass BODY_WIDTH as 3rd argument to html2text() setting BODY_WIDTH in config.py alone doesn't work anymore since html2text has gone through some refactoring and probably broke backwards compability. now we need to pass BODY_WIDTH as 3rd argument to the html2text initializer. i think these are the html2text commits that let to this incompability: https://github.com/Alir3z4/html2text/commit/1ba191f11d9e0f01e9a271320b8efdaaa271d199 https://github.com/Alir3z4/html2text/commit/192ca940f8f65b4489d46ae523e9689fd1ca0366 without this fix, changing body-width (to 0 for example) in rss2email.cfg has no effect. --- rss2email/feed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rss2email/feed.py b/rss2email/feed.py index f2750ef..1a5aae2 100644 --- a/rss2email/feed.py +++ b/rss2email/feed.py @@ -441,7 +441,7 @@ def _check_for_errors(self, parsed): def _html2text(self, html, baseurl='', default=None): self.config.setup_html2text(section=self.section) try: - return _html2text.html2text(html=html, baseurl=baseurl) + return _html2text.html2text(html=html, baseurl=baseurl, bodywidth=_html2text.BODY_WIDTH) except _html_parser.HTMLParseError as e: if default is not None: return default