Simplification

pull/178/head
M66B 4 years ago
parent 5730c99261
commit ab5580ec53

@ -503,7 +503,7 @@ public class HtmlHelper {
break;
case "padding-top":
if (element.isBlock()) {
if (element.isBlock() && hasVisibleContent(element.childNodes())) {
Float pt = getFontSize(value, null);
if (pt != null && pt >= 0.5)
element.attr("line", "before");
@ -511,7 +511,7 @@ public class HtmlHelper {
break;
case "padding-bottom":
if (element.isBlock()) {
if (element.isBlock() && hasVisibleContent(element.childNodes())) {
Float pb = getFontSize(value, null);
if (pb != null && pb >= 0.5)
element.attr("line", "after");
@ -798,12 +798,10 @@ public class HtmlHelper {
for (Element div : document.select("div"))
div.tagName("span");
for (Element e : document.select("*[line=before]"))
if (hasVisibleContent(e.childNodes()))
for (Element e : document.select("*[line]"))
if ("before".equals(e.attr("line")))
e.prependElement("br");
for (Element e : document.select("*[line=after]"))
if (hasVisibleContent(e.childNodes()))
else
e.appendElement("br");
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N)

Loading…
Cancel
Save