Let line breaking match original message closer

pull/174/head
M66B 6 years ago
parent 87aae49496
commit 393e3b6c3b

@ -649,13 +649,9 @@ public class HtmlHelper {
if (prev instanceof Element && !((Element) prev).isBlock()) if (prev instanceof Element && !((Element) prev).isBlock())
div.prependElement("br"); div.prependElement("br");
int childs = div.childNodeSize(); if (hasVisibleContent(div.childNodes()))
Node last = (childs > 0 ? div.childNode(childs - 1) : null);
if ((last == null || !"div".equals(last.nodeName())) &&
hasVisibleContent(div.childNodes())) {
div.appendElement("br"); div.appendElement("br");
} }
}
for (Element div : document.select("div")) for (Element div : document.select("div"))
div.tagName("span"); div.tagName("span");

Loading…
Cancel
Save