Remove successive block quotes

pull/191/head
M66B 4 years ago
parent 4191add06f
commit 98fcae971b

@ -2216,9 +2216,17 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
// Collapse quotes
if (!show_quotes) {
for (Element quote : document.select("blockquote"))
List<Element> succesive = new ArrayList<>();
for (Element quote : document.select("blockquote")) {
Element next = quote.nextElementSibling();
if (next != null && "blockquote".equals(next.tagName()))
succesive.add(quote);
else
quote.html("&#8230;");
}
for (Element quote : succesive)
quote.remove();
}
// Draw images
SpannableStringBuilder ssb = HtmlHelper.fromDocument(context, document, new Html.ImageGetter() {

Loading…
Cancel
Save