Process padding top/bottom

pull/178/head
M66B 6 years ago
parent 117ddf1e51
commit 6b9b1d6c32

@ -501,6 +501,22 @@ public class HtmlHelper {
}
}
break;
case "padding-top":
if (element.isBlock()) {
Float pt = getFontSize(value, null);
if (pt != null && pt >= 0.5)
element.attr("line", "before");
}
break;
case "padding-bottom":
if (element.isBlock()) {
Float pb = getFontSize(value, null);
if (pb != null && pb >= 0.5)
element.attr("line", "after");
}
break;
}
}
}
@ -782,6 +798,14 @@ public class HtmlHelper {
for (Element div : document.select("div"))
div.tagName("span");
for (Element e : document.select("*[line=before]"))
if (hasVisibleContent(e.childNodes()))
e.prependElement("br");
for (Element e : document.select("*[line=after]"))
if (hasVisibleContent(e.childNodes()))
e.appendElement("br");
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N)
for (Element span : document.select("span"))
if (!TextUtils.isEmpty(span.attr("color")))

Loading…
Cancel
Save