Reparent sub lists

This commit is contained in:
M66B 2022-05-28 10:22:27 +02:00
parent 89363461d5
commit f29cbd1f0e
1 changed files with 8 additions and 0 deletions

View File

@ -3704,6 +3704,14 @@ public class HtmlHelper {
li.removeAttr("dir");
}
e.attr("dir", rtl > ltr ? "rtl" : "ltr");
Element parent = e.parent();
Element prev = e.previousElementSibling();
if (parent != null && !"li".equals(parent.tagName()) &&
prev != null && "li".equals(prev.tagName())) {
e.remove();
prev.appendChild(e);
}
}
for (Element quote : doc.select("blockquote")) {