X-Git-Url: https://git.sommitrealweird.co.uk/rss2maildir.git/blobdiff_plain/9a4c55083ef741cd562529f93b331f4c583e61b7..64f951d0b32c3c210b71ef941e23b8dd98f13658:/rss2maildir.py diff --git a/rss2maildir.py b/rss2maildir.py index 3e4ed60..a0c40a1 100755 --- a/rss2maildir.py +++ b/rss2maildir.py @@ -227,9 +227,9 @@ class HTML2Text(HTMLParser): elif self.inpre: self.text = self.text + unicode(data, "utf-8") else: - isallwhitespace = data.strip() - if isallwhitespace != "" and self.text[-1] == "\n": - self.text = self.text + unicode(data, "utf-8").strip() + u' ' + isallwhitespace = data.strip() == "" + if not isallwhitespace: + self.text = self.text + unicode(data, "utf-8").strip() + u' ' def handle_entityref(self, name): entity = name