From 03cd176c2773b6951bd496b46658570f2fe62eea Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 25 Oct 2018 15:33:35 +0200 Subject: [PATCH] =?UTF-8?q?refined=20nick=20matching=20patter.=20word=20bo?= =?UTF-8?q?undry=20(\b)=20doesn=E2=80=99t=20match=20on=20words=20ending=20?= =?UTF-8?q?in=20a=20boundry?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #3249 --- .../eu/siacs/conversations/services/NotificationService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/services/NotificationService.java b/src/main/java/eu/siacs/conversations/services/NotificationService.java index ba12612b3..53a9f4cba 100644 --- a/src/main/java/eu/siacs/conversations/services/NotificationService.java +++ b/src/main/java/eu/siacs/conversations/services/NotificationService.java @@ -98,7 +98,7 @@ public class NotificationService { } public static Pattern generateNickHighlightPattern(final String nick) { - return Pattern.compile("(?<=(^|\\s))" + Pattern.quote(nick) + "\\b"); + return Pattern.compile("(?<=(^|\\s))" + Pattern.quote(nick) + "(?=\\s|$|\\p{Punct})"); } @RequiresApi(api = Build.VERSION_CODES.O)