Insert new lines before non block elements

pull/174/head
M66B 5 years ago
parent c7b9a239e7
commit cd7bc4590e

@ -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…
Cancel
Save