Browse Source

Improve the matcher pattern

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic 6 years ago
parent
commit
3736fd1483
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/src/main/java/com/nextcloud/talk/utils/MagicCharPolicy.java

+ 1 - 1
app/src/main/java/com/nextcloud/talk/utils/MagicCharPolicy.java

@@ -43,7 +43,7 @@ public class MagicCharPolicy implements AutocompletePolicy {
         }
         }
 
 
         int[] span = new int[2];
         int[] span = new int[2];
-        Pattern pattern = Pattern.compile("@.*\\w*", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);
+        Pattern pattern = Pattern.compile("@+\\S*", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);
         Matcher matcher = pattern.matcher(text);
         Matcher matcher = pattern.matcher(text);
 
 
         while (matcher.find()) {
         while (matcher.find()) {