Fixed suppressing line breaks

pull/174/head
M66B 5 years ago
parent 85356f24bc
commit c7b9a239e7

@ -638,12 +638,16 @@ public class HtmlHelper {
} }
// Selective new lines // Selective new lines
for (Element div : document.select("div")) for (Element div : document.select("div")) {
if (!Boolean.parseBoolean(div.attr("inline")) && boolean inline = Boolean.parseBoolean(div.attr("inline"));
div.children().select("div").size() == 0 && int childs = div.childNodeSize();
Node last = (childs > 0 ? div.childNode(childs - 1) : null);
if (!inline &&
(last == null || !"div".equals(last.nodeName())) &&
hasVisibleContent(div.childNodes())) { 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