diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/text/HtmlParser.java b/mastodon/src/main/java/org/joinmastodon/android/ui/text/HtmlParser.java index 03634a0155..9d679db334 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/text/HtmlParser.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/text/HtmlParser.java @@ -123,6 +123,9 @@ public SpanInfo(Object span, int start, Element element, boolean more){ int colorInsert=UiUtils.getThemeColor(context, R.attr.colorM3Success); int colorDelete=UiUtils.getThemeColor(context, R.attr.colorM3Error); + if(source.endsWith("\n")) + source=source.stripTrailing(); + Jsoup.parseBodyFragment(source).body().traverse(new NodeVisitor(){ private final ArrayList openSpans=new ArrayList<>();