From 4f663365b7baa7e5d7d52b0adb2c4956a363030f Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 30 Jan 2020 11:12:26 +0100 Subject: [PATCH] Support for ordered lists --- app/src/main/java/eu/faircode/email/HtmlHelper.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index f63ed5b3b0..d1b1dc92c0 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -507,7 +507,11 @@ public class HtmlHelper { // Lists for (Element li : document.select("li")) { 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 } document.select("ol").tagName("div");