Support for ordered lists

pull/172/head
M66B 5 years ago
parent 72f69995c4
commit 4f663365b7

@ -507,7 +507,11 @@ public class HtmlHelper {
// Lists // Lists
for (Element li : document.select("li")) { for (Element li : document.select("li")) {
li.tagName("span"); li.tagName("span");
li.prependText("* "); Element parent = li.parent();
if (parent == null || "ul".equals(parent.tagName()))
li.prependText("• ");
else
li.prependText((li.elementSiblingIndex() + 1) + ". ");
li.appendElement("br"); // line break after list item li.appendElement("br"); // line break after list item
} }
document.select("ol").tagName("div"); document.select("ol").tagName("div");

Loading…
Cancel
Save