1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-29 03:05:31 +00:00

Let line breaking match original message closer

This commit is contained in:
M66B 2020-02-06 16:59:05 +01:00
parent 87aae49496
commit 393e3b6c3b

View file

@ -649,12 +649,8 @@ public class HtmlHelper {
if (prev instanceof Element && !((Element) prev).isBlock()) if (prev instanceof Element && !((Element) prev).isBlock())
div.prependElement("br"); div.prependElement("br");
int childs = div.childNodeSize(); if (hasVisibleContent(div.childNodes()))
Node last = (childs > 0 ? div.childNode(childs - 1) : null);
if ((last == null || !"div".equals(last.nodeName())) &&
hasVisibleContent(div.childNodes())) {
div.appendElement("br"); div.appendElement("br");
}
} }
for (Element div : document.select("div")) for (Element div : document.select("div"))