mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-12 15:19:04 +00:00
Insert new lines before non block elements
This commit is contained in:
parent
c7b9a239e7
commit
cd7bc4590e
1 changed files with 4 additions and 0 deletions
|
@ -639,6 +639,10 @@ public class HtmlHelper {
|
|||
|
||||
// Selective new lines
|
||||
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"));
|
||||
int childs = div.childNodeSize();
|
||||
Node last = (childs > 0 ? div.childNode(childs - 1) : null);
|
||||
|
|
Loading…
Add table
Reference in a new issue