mirror of https://github.com/M66B/FairEmail.git
Support for ordered lists
This commit is contained in:
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…
Reference in New Issue