From 393e3b6c3b3b928e642e1c5a28315243486c547d Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 6 Feb 2020 16:59:05 +0100 Subject: [PATCH] Let line breaking match original message closer --- app/src/main/java/eu/faircode/email/HtmlHelper.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index 2f19a25577..345a7bb73b 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -649,12 +649,8 @@ public class HtmlHelper { if (prev instanceof Element && !((Element) prev).isBlock()) div.prependElement("br"); - int childs = div.childNodeSize(); - Node last = (childs > 0 ? div.childNode(childs - 1) : null); - if ((last == null || !"div".equals(last.nodeName())) && - hasVisibleContent(div.childNodes())) { + if (hasVisibleContent(div.childNodes())) div.appendElement("br"); - } } for (Element div : document.select("div"))