Less line breaking

pull/167/head
M66B 6 years ago
parent 782394d655
commit db7608a833

@ -247,13 +247,15 @@ public class HtmlHelper {
} }
// Remove new lines without surrounding content // Remove new lines without surrounding content
for (Element br : document.select("br")) //for (Element br : document.select("br"))
if (br.parent() != null && !hasVisibleContent(br.parent().childNodes())) // if (br.parent() != null && !hasVisibleContent(br.parent().childNodes()))
br.tagName("span"); // br.tagName("span");
// Paragraphs // Paragraphs
for (Element p : document.select("p")) for (Element p : document.select("p")) {
p.appendElement("br");
p.tagName("div"); p.tagName("div");
}
// Short quotes // Short quotes
for (Element q : document.select("q")) { for (Element q : document.select("q")) {
@ -480,7 +482,6 @@ public class HtmlHelper {
div.children().select("div").size() == 0 && div.children().select("div").size() == 0 &&
hasVisibleContent(div.childNodes())) { hasVisibleContent(div.childNodes())) {
div.appendElement("br"); div.appendElement("br");
div.appendElement("br");
} }
for (Element div : document.select("div")) for (Element div : document.select("div"))

Loading…
Cancel
Save