From acb89f861174b84c5cef51b18d493eaef23814b1 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 6 Nov 2020 14:56:57 +0100 Subject: [PATCH] Newline below heading --- app/src/main/java/eu/faircode/email/HtmlHelper.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index 2d135fddb8..6930f61e07 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -758,12 +758,14 @@ public class HtmlHelper { } // Replace headings - if (!text_size) - for (Element h : document.select("h1,h2,h3,h4,h5,h6")) { + for (Element h : document.select("h1,h2,h3,h4,h5,h6")) { + if (!"false".equals(h.attr("x-line-after"))) h.appendElement("br"); + if (!text_size) { h.appendElement("br"); h.tagName("strong"); } + } // Paragraphs for (Element p : document.select("p")) {