Append br to div with one text node

pull/162/head
M66B 5 years ago
parent 4c57d7f744
commit 93ca78abab

@ -366,8 +366,9 @@ public class HtmlHelper {
// Prevent too many line breaks
for (Element div : document.select("div")) {
div.tagName("span");
if (div.parent() != null)
div.after(document.createElement("br"));
if (div.childNodeSize() == 1 && div.childNode(0) instanceof TextNode)
div.appendElement("br");
div.appendElement("br");
}
Element body = document.body();

Loading…
Cancel
Save