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:
parent
4eb91ca061
commit
168b1f3638
1 changed files with 10 additions and 3 deletions
|
@ -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 a new issue