Remove br at end of paragraph

pull/212/head
M66B 2 years ago
parent 3917be6c77
commit 6137988040

@ -1112,6 +1112,14 @@ public class HtmlHelper {
hs.attr("x-line-after", "true"); hs.attr("x-line-after", "true");
} }
// Breaks
for (Element br : document.select("br")) {
Element parent = br.parent();
Element last = (parent == null ? null : parent.lastElementChild());
if (br == last)
br.remove();
}
// Paragraphs // Paragraphs
for (Element p : document.select("p")) { for (Element p : document.select("p")) {
p.tagName("div"); p.tagName("div");

Loading…
Cancel
Save