mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 15:11:03 +00:00
Append br to div with one text node
This commit is contained in:
parent
4c57d7f744
commit
93ca78abab
1 changed files with 3 additions and 2 deletions
|
@ -366,8 +366,9 @@ public class HtmlHelper {
|
||||||
// Prevent too many line breaks
|
// Prevent too many line breaks
|
||||||
for (Element div : document.select("div")) {
|
for (Element div : document.select("div")) {
|
||||||
div.tagName("span");
|
div.tagName("span");
|
||||||
if (div.parent() != null)
|
if (div.childNodeSize() == 1 && div.childNode(0) instanceof TextNode)
|
||||||
div.after(document.createElement("br"));
|
div.appendElement("br");
|
||||||
|
div.appendElement("br");
|
||||||
}
|
}
|
||||||
|
|
||||||
Element body = document.body();
|
Element body = document.body();
|
||||||
|
|
Loading…
Reference in a new issue