1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-24 07:01:05 +00:00

Append br to div with one text node

This commit is contained in:
M66B 2019-09-11 19:52:04 +02:00
parent 4c57d7f744
commit 93ca78abab

View file

@ -366,8 +366,9 @@ public class HtmlHelper {
// Prevent too many line breaks
for (Element div : document.select("div")) {
div.tagName("span");
if (div.parent() != null)
div.after(document.createElement("br"));
if (div.childNodeSize() == 1 && div.childNode(0) instanceof TextNode)
div.appendElement("br");
div.appendElement("br");
}
Element body = document.body();