Allow space when searching for @mention

This commit is contained in:
Tom Moor committed 2024-08-22 09:21:23 -04:00
1 parent 510a756378
commit 976db13ea0
1 file changed
+1 -1
+1 -1
View File
@@ -9,7 +9,7 @@ export default class MentionMenuExtension extends Suggestion {
return {
// ported from https://github.com/tc39/proposal-regexp-unicode-property-escapes#unicode-aware-version-of-w
openRegex: /(?:^|\s|\()@([\p{L}\p{M}\d]+)?$/u,
closeRegex: /(?:^|\s|\()@(([\p{L}\p{M}\d]*\s+)|(\s+[\p{L}\p{M}\d]+))$/u,
closeRegex: /(?:^|\s|\()@(([\p{L}\p{M}\d]*\s{2})|(\s+[\p{L}\p{M}\d]+))$/u,
};
}