X-Git-Url: https://git.sommitrealweird.co.uk/rss2maildir.git/blobdiff_plain/0aa27bf39e80cd41081f4d5a49015e1c17ae9f68..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