1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 17:57:16 +00:00

Thunderbird style plain text formatting

This commit is contained in:
M66B 2021-02-21 16:05:33 +01:00
parent 4eb91ca061
commit 168b1f3638

View file

@ -1796,14 +1796,21 @@ public class HtmlHelper {
int start = ssb.getSpanStart(span);
int end = ssb.getSpanEnd(span);
if (span.getStyle() == Typeface.ITALIC) {
ssb.insert(end, "/");
ssb.insert(start, "/");
} else if (span.getStyle() == Typeface.BOLD) {
ssb.insert(end, "*");
ssb.insert(start, "*");
} else if (span.getStyle() == Typeface.BOLD) {
ssb.insert(end, "**");
ssb.insert(start, "**");
}
}
for (UnderlineSpan span : ssb.getSpans(0, ssb.length(), UnderlineSpan.class)) {
int start = ssb.getSpanStart(span);
int end = ssb.getSpanEnd(span);
ssb.insert(end, "_");
ssb.insert(start, "_");
}
for (URLSpan span : ssb.getSpans(0, ssb.length(), URLSpan.class)) {
String url = span.getURL();
if (TextUtils.isEmpty(url))