kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
MentionPlugin: use a simpler regex, fix double-@ mentions
Fixes https://gitlab.com/soapbox-pub/soapbox/-/issues/1530environments/review-fix-double-v0jtu2/deployments/4049
rodzic
5449ea3326
commit
f628cd73b0
|
@ -12,7 +12,7 @@ import { $createMentionNode, MentionNode } from '../nodes/mention-node';
|
|||
|
||||
import type { TextNode } from 'lexical';
|
||||
|
||||
const MENTION_REGEX = /(?:^|\s)@(?:[a-z\d_-]+(?:@[^@\s]+)?)/i;
|
||||
const MENTION_REGEX = /(?:^|\s)@[^\s]+/i;
|
||||
|
||||
const MentionPlugin = (): JSX.Element | null => {
|
||||
const [editor] = useLexicalComposerContext();
|
||||
|
|
Ładowanie…
Reference in New Issue