Remove br from paragraphs only

pull/212/head
M66B 2 years ago
parent 76b199ff45
commit 8836c85a34

@ -1115,8 +1115,9 @@ public class HtmlHelper {
// Breaks
for (Element br : document.select("br")) {
Element parent = br.parent();
Element last = (parent == null ? null : parent.lastElementChild());
if (br == last)
if (parent == null || !"p".equals(parent.tagName()))
continue;
if (br == parent.lastElementChild())
br.remove();
}

Loading…
Cancel
Save