mirror of https://github.com/M66B/FairEmail.git
Prevent double line breaks
This commit is contained in:
parent
9ec206f150
commit
fec1e8dfcc
|
@ -267,6 +267,14 @@ public class HtmlHelper {
|
|||
// if (br.parent() != null && !hasVisibleContent(br.parent().childNodes()))
|
||||
// br.tagName("span");
|
||||
|
||||
for (Element div : document.select("div"))
|
||||
if (div.children().select("div").size() == 0 &&
|
||||
hasVisibleContent(div.childNodes())) {
|
||||
Node last = div.childNode(div.childNodeSize() - 1);
|
||||
if (last != null && "br".equals(last.nodeName()))
|
||||
last.remove();
|
||||
}
|
||||
|
||||
// Paragraphs
|
||||
for (Element p : document.select("p")) {
|
||||
p.appendElement("br");
|
||||
|
|
Loading…
Reference in New Issue