From 3247d20c14b6ad67f893429ebf3e77ad99239509 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 24 Feb 2020 20:34:16 +0100 Subject: [PATCH] Cleanup --- app/src/main/java/eu/faircode/email/HtmlHelper.java | 7 ++----- 1 file changed, 2 insertions(+), 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 1125c44754..1629c4bfb2 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -508,11 +508,7 @@ public class HtmlHelper { } } - // Remove new lines without surrounding content - //for (Element br : document.select("br")) - // if (br.parent() != null && !hasVisibleContent(br.parent().childNodes())) - // br.tagName("span"); - + // Remove trailing br from div for (Element div : document.select("div")) if (div.children().select("div").size() == 0 && hasVisibleContent(div.childNodes())) { @@ -521,6 +517,7 @@ public class HtmlHelper { last.remove(); } + // Replace headings if (!text_size) for (Element h : document.select("h1,h2,h3,h4,h5,h6")) { h.appendElement("br");