From 3faca540502b700513ff4124cf28583a24fe2522 Mon Sep 17 00:00:00 2001 From: Lionel Dricot Date: Sun, 27 Feb 2022 22:54:28 +0100 Subject: [PATCH] … spotted in a wild page and implemented --- offpunk.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/offpunk.py b/offpunk.py index 57ff9a8..386f42c 100755 --- a/offpunk.py +++ b/offpunk.py @@ -736,7 +736,8 @@ class HtmlRenderer(AbstractRenderer): toreturn = string.replace("\n", " ").replace("\t"," ").strip() while " " in toreturn: toreturn = toreturn.replace(" "," ") - toreturn = toreturn.replace(" ","\xa0") + toreturn = toreturn.replace(" ","\xa0").replace(" ","\xa0") + toreturn = toreturn.replace("…","\u2026").replace("&mldr","\u2026") if endspace and not toreturn.endswith(" ") and not toreturn.endswith("\xa0"): toreturn += " " if startspace and not toreturn.startswith(" ") and not toreturn.startswith("\xa0"):