From cc1aa9e431eb99529345b976c1236628b8bbd34f Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 7 Apr 2017 14:30:30 +0200 Subject: [PATCH] exclude >= from being recognized as quote --- src/main/java/eu/siacs/conversations/utils/UIHelper.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/utils/UIHelper.java b/src/main/java/eu/siacs/conversations/utils/UIHelper.java index 94ae13a8..44abf075 100644 --- a/src/main/java/eu/siacs/conversations/utils/UIHelper.java +++ b/src/main/java/eu/siacs/conversations/utils/UIHelper.java @@ -231,7 +231,8 @@ public class UIHelper { public static boolean isPositionFollowedByQuoteableCharacter(CharSequence body, int pos) { return !isPositionFollowedByNumber(body, pos) - && !isPositionFollowedByEmoticon(body,pos); + && !isPositionFollowedByEmoticon(body,pos) + && !isPositionFollowedByEquals(body,pos); } private static boolean isPositionFollowedByNumber(CharSequence body, int pos) { @@ -249,6 +250,10 @@ public class UIHelper { return previousWasNumber; } + private static boolean isPositionFollowedByEquals(CharSequence body, int pos) { + return body.length() > pos + 1 && body.charAt(pos+1) == '='; + } + private static boolean isPositionFollowedByEmoticon(CharSequence body, int pos) { if (body.length() <= pos +1) { return false;