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 03634a015..9d679db33 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 class HtmlParser{ 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<>();