Improve the matcher pattern

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2019-01-29 13:20:19 +01:00
parent 700cf860af
commit 3736fd1483

View File

@ -43,7 +43,7 @@ public class MagicCharPolicy implements AutocompletePolicy {
}
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);
while (matcher.find()) {