From ba34561235f012ede369b02e496d6be4c9ffe45c Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 12 Jan 2019 14:26:33 +0100 Subject: [PATCH] ignore code block start in message preview. fixes #3124 --- src/main/java/eu/siacs/conversations/utils/UIHelper.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/utils/UIHelper.java b/src/main/java/eu/siacs/conversations/utils/UIHelper.java index 5d8098c2b..83cff19b4 100644 --- a/src/main/java/eu/siacs/conversations/utils/UIHelper.java +++ b/src/main/java/eu/siacs/conversations/utils/UIHelper.java @@ -314,6 +314,9 @@ public class UIHelper { SpannableStringBuilder builder = new SpannableStringBuilder(); for (CharSequence l : CharSequenceUtils.split(styledBody, '\n')) { if (l.length() > 0) { + if (l.toString().equals("```")) { + continue; + } char first = l.charAt(0); if ((first != '>' || !isPositionFollowedByQuoteableCharacter(l, 0)) && first != '\u00bb') { CharSequence line = CharSequenceUtils.trim(l);