Suppress view list levels

pull/207/head
M66B 2 years ago
parent b1e0a9c365
commit 996cb33c90

@ -1280,6 +1280,8 @@ public class HtmlHelper {
if (!"false".equals(e.attr("x-line-after"))) if (!"false".equals(e.attr("x-line-after")))
e.attr("x-line-after", "true"); e.attr("x-line-after", "true");
} }
if ("ol".equals(e.tagName()) || "ul".equals(e.tagName()))
e.attr("x-list-level", "false");
} else { } else {
if (!BuildConfig.DEBUG) { if (!BuildConfig.DEBUG) {
String style = e.attr("style"); String style = e.attr("style");
@ -3369,7 +3371,8 @@ public class HtmlHelper {
Element parent = element.parent(); Element parent = element.parent();
while (parent != null) { while (parent != null) {
if ("ol".equals(parent.tagName()) || "ul".equals(parent.tagName())) { if ("ol".equals(parent.tagName()) || "ul".equals(parent.tagName())) {
level++; if (!"false".equals(parent.attr("x-list-level")))
level++;
if (list == null) if (list == null)
list = parent; list = parent;
if (TextUtils.isEmpty(ltype)) if (TextUtils.isEmpty(ltype))
@ -3600,6 +3603,7 @@ public class HtmlHelper {
.removeAttr("x-tracking") .removeAttr("x-tracking")
.removeAttr("x-border") .removeAttr("x-border")
.removeAttr("x-list-style") .removeAttr("x-list-style")
.removeAttr("x-list-level")
.removeAttr("x-plain") .removeAttr("x-plain")
.remove("x-keep-line"); .remove("x-keep-line");
} }

Loading…
Cancel
Save