Skip to content

Commit

Permalink
Suppress view list levels
Browse files Browse the repository at this point in the history
  • Loading branch information
M66B committed May 21, 2022
1 parent b1e0a9c commit 996cb33
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/src/main/java/eu/faircode/email/HtmlHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,8 @@ public void tail(Node node, int depth) {
if (!"false".equals(e.attr("x-line-after")))
e.attr("x-line-after", "true");
}
if ("ol".equals(e.tagName()) || "ul".equals(e.tagName()))
e.attr("x-list-level", "false");
} else {
if (!BuildConfig.DEBUG) {
String style = e.attr("style");
Expand Down Expand Up @@ -3369,7 +3371,8 @@ else if ("underline".equals(value))
Element parent = element.parent();
while (parent != null) {
if ("ol".equals(parent.tagName()) || "ul".equals(parent.tagName())) {
level++;
if (!"false".equals(parent.attr("x-list-level")))
level++;
if (list == null)
list = parent;
if (TextUtils.isEmpty(ltype))
Expand Down Expand Up @@ -3600,6 +3603,7 @@ static void clearAnnotations(Document d) {
.removeAttr("x-tracking")
.removeAttr("x-border")
.removeAttr("x-list-style")
.removeAttr("x-list-level")
.removeAttr("x-plain")
.remove("x-keep-line");
}
Expand Down

0 comments on commit 996cb33

Please sign in to comment.