Prepend line break if visible content only

pull/174/head
M66B 5 years ago
parent 393e3b6c3b
commit ee9b188a55

@ -646,7 +646,7 @@ public class HtmlHelper {
// Selective new lines
for (Element div : document.select("div")) {
Node prev = div.previousSibling();
if (prev instanceof Element && !((Element) prev).isBlock())
if (prev != null && hasVisibleContent(Arrays.asList(prev)))
div.prependElement("br");
if (hasVisibleContent(div.childNodes()))

Loading…
Cancel
Save