mirror of https://github.com/M66B/FairEmail.git
Thunderbird style plain text formatting
This commit is contained in:
parent
4eb91ca061
commit
168b1f3638
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue