From e28b8e87c25b9a844ee08608225dd3212a118a21 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 25 Apr 2020 16:16:27 +0200 Subject: [PATCH] Custom render: i/b tags --- app/src/main/java/eu/faircode/email/HtmlHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index b221d37315..bd5dd3541a 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -754,7 +754,7 @@ public class HtmlHelper { // Lists // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li - if (!experiments) { + if (!experiments || !view) { for (Element li : document.select("li")) { li.tagName("span"); Element parent = li.parent(); @@ -1918,6 +1918,7 @@ public class HtmlHelper { case "br": newline(ssb.length()); break; + case "i": case "em": ssb.setSpan(new StyleSpan(Typeface.ITALIC), start, ssb.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); break; @@ -1985,6 +1986,7 @@ public class HtmlHelper { case "span": // Do nothing break; + case "b": case "strong": ssb.setSpan(new StyleSpan(Typeface.BOLD), start, ssb.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); break;