From ac087eccfd0cf85318f9a55ecd12df20eb5cf862 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 26 Dec 2022 17:53:57 +0100 Subject: [PATCH] Fix issue #686 - Users with on char username are not linked --- app/src/main/java/app/fedilab/android/helper/Helper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/app/fedilab/android/helper/Helper.java b/app/src/main/java/app/fedilab/android/helper/Helper.java index bc6d44e2..75ea7626 100644 --- a/app/src/main/java/app/fedilab/android/helper/Helper.java +++ b/app/src/main/java/app/fedilab/android/helper/Helper.java @@ -317,7 +317,7 @@ public class Helper { public static final Pattern hashtagPattern = Pattern.compile("(#[\\w_A-zÀ-ÿ]+)"); public static final Pattern groupPattern = Pattern.compile("(![\\w_]+)"); - public static final Pattern mentionPattern = Pattern.compile("(@[\\w_.-]+[\\w])"); + public static final Pattern mentionPattern = Pattern.compile("(@[\\w_.-]?[\\w]+)"); public static final Pattern mentionLongPattern = Pattern.compile("(@[\\w_.-]+@[a-zA-Z0-9][a-zA-Z0-9.-]{1,61}[a-zA-Z0-9](?:\\.[a-zA-Z]{2,})+)"); public static final Pattern twitterPattern = Pattern.compile("((@[\\w]+)@twitter\\.com)");