aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-11-08 06:47:50 +0100
committerChristian Schneppe <christian@pix-art.de>2018-11-08 06:47:50 +0100
commitb0599b923df86cf4bc9b2657aa2881bb6e70b9bc (patch)
tree869bbc2519f698f48065f8494d8ec6f95e2c1382 /src/main/java/de/pixart
parent2bd3eeac7b7661b2c423c28d7fffafda8c8e420d (diff)
refined nick matching patter. word boundry (\b) doesn’t match on words ending in a boundry
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/services/NotificationService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/services/NotificationService.java b/src/main/java/de/pixart/messenger/services/NotificationService.java
index c60e652bb..3d19e05c7 100644
--- a/src/main/java/de/pixart/messenger/services/NotificationService.java
+++ b/src/main/java/de/pixart/messenger/services/NotificationService.java
@@ -101,7 +101,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)