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 75de19a93..be120dd16 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
@@ -94,12 +94,6 @@ public class HtmlParser{
ssb.append(textNode.text());
}else if(node instanceof Element el){
switch(el.nodeName()){
- case "p" -> {
- Node sib=el.previousSibling();
- // compensate for missing empty line after to match the empty
- // line added by the
before
elements
- if(sib!=null && !sib.nodeName().equals("p")) ssb.append('\n');
- }
case "a" -> {
String href=el.attr("href");
LinkSpan.Type linkType;
@@ -143,7 +137,7 @@ public class HtmlParser{
if(node instanceof Element el){
if("span".equals(el.nodeName()) && el.hasClass("ellipsis")){
ssb.append("…", new DeleteWhenCopiedSpan(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
- }else if("p".equals(el.nodeName())){
+ }else if("p".equals(el.nodeName()) || "ul".equals(el.nodeName()) || "ol".equals(el.nodeName())){
if(node.nextSibling()!=null)
ssb.append("\n\n");
}else if(!openSpans.isEmpty()){
@@ -153,9 +147,7 @@ public class HtmlParser{
openSpans.remove(openSpans.size()-1);
}
if("li".equals(el.nodeName())) {
- ssb.append('\n');
- Node sib=node.nextSibling();
- if(sib!=null && !sib.nodeName().equals("li")) ssb.append('\n');
+ if(node.nextSibling()!=null) ssb.append('\n');
}
}
}