mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-03 18:26:20 +00:00
Fixed suppressing line breaks
This commit is contained in:
parent
85356f24bc
commit
c7b9a239e7
1 changed files with 7 additions and 3 deletions
|
@ -638,12 +638,16 @@ public class HtmlHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Selective new lines
|
// Selective new lines
|
||||||
for (Element div : document.select("div"))
|
for (Element div : document.select("div")) {
|
||||||
if (!Boolean.parseBoolean(div.attr("inline")) &&
|
boolean inline = Boolean.parseBoolean(div.attr("inline"));
|
||||||
div.children().select("div").size() == 0 &&
|
int childs = div.childNodeSize();
|
||||||
|
Node last = (childs > 0 ? div.childNode(childs - 1) : null);
|
||||||
|
if (!inline &&
|
||||||
|
(last == null || !"div".equals(last.nodeName())) &&
|
||||||
hasVisibleContent(div.childNodes())) {
|
hasVisibleContent(div.childNodes())) {
|
||||||
div.appendElement("br");
|
div.appendElement("br");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (Element div : document.select("div"))
|
for (Element div : document.select("div"))
|
||||||
div.tagName("span");
|
div.tagName("span");
|
||||||
|
|
Loading…
Reference in a new issue