|
|
@ -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");
|
|
|
|