Refactoring

pull/187/head
M66B 4 years ago
parent 6d86074e9d
commit aeb07df400

@ -2348,8 +2348,8 @@ public class HtmlHelper {
String html = converter.toHtml(spanned, TO_HTML_PARAGRAPH_LINES_INDIVIDUAL); String html = converter.toHtml(spanned, TO_HTML_PARAGRAPH_LINES_INDIVIDUAL);
Document doc = JsoupEx.parse(html); Document doc = JsoupEx.parse(html);
for (Element element : doc.select("span")) { for (Element span : doc.select("span")) {
String style = element.attr("style"); String style = span.attr("style");
if (TextUtils.isEmpty(style)) if (TextUtils.isEmpty(style))
continue; continue;
@ -2373,9 +2373,9 @@ public class HtmlHelper {
Float size = getFontSize(v, 1.0f); Float size = getFontSize(v, 1.0f);
if (size != null) { if (size != null) {
if (size < 1.0f) if (size < 1.0f)
element.tagName("small"); span.tagName("small");
else if (size > 1.0f) else if (size > 1.0f)
element.tagName("big"); span.tagName("big");
} }
break; break;
case "text-align": case "text-align":
@ -2386,9 +2386,9 @@ public class HtmlHelper {
} }
if (sb.length() == 0) if (sb.length() == 0)
element.removeAttr("style"); span.removeAttr("style");
else else
element.attr("style", sb.toString()); span.attr("style", sb.toString());
} }
} }

Loading…
Cancel
Save