From 35cf9faf622a283fabdbe40839d04d2e4ace93e6 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 7 Nov 2019 10:30:31 +0100 Subject: [PATCH] Suppress extra spaces --- app/src/main/java/eu/faircode/email/HtmlHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index 6307cdff48..8f6ab1788d 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -674,7 +674,9 @@ public class HtmlHelper { newline(); tlevel = qlevel; } - if (!nl) + if (!nl && + (text != null && !text.startsWith(" ")) && + (sb.length() > 0 && sb.charAt(sb.length() - 1) != ' ')) sb.append(" "); sb.append(text); nl = false;