mirror of https://github.com/M66B/FairEmail.git
Insert new lines before non block elements
This commit is contained in:
parent
c7b9a239e7
commit
cd7bc4590e
|
@ -639,6 +639,10 @@ public class HtmlHelper {
|
||||||
|
|
||||||
// Selective new lines
|
// Selective new lines
|
||||||
for (Element div : document.select("div")) {
|
for (Element div : document.select("div")) {
|
||||||
|
Node prev = div.previousSibling();
|
||||||
|
if (prev instanceof Element && !((Element) prev).isBlock())
|
||||||
|
div.prependElement("br");
|
||||||
|
|
||||||
boolean inline = Boolean.parseBoolean(div.attr("inline"));
|
boolean inline = Boolean.parseBoolean(div.attr("inline"));
|
||||||
int childs = div.childNodeSize();
|
int childs = div.childNodeSize();
|
||||||
Node last = (childs > 0 ? div.childNode(childs - 1) : null);
|
Node last = (childs > 0 ? div.childNode(childs - 1) : null);
|
||||||
|
|
Loading…
Reference in New Issue