mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-22 22:21:18 +00:00
Refactoring
This commit is contained in:
parent
6d86074e9d
commit
aeb07df400
1 changed files with 6 additions and 6 deletions
|
@ -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…
Reference in a new issue