fix mention regex

This commit is contained in:
keyan 2023-10-06 16:01:19 -05:00
parent b995b7dd3b
commit 58c5844492
1 changed files with 1 additions and 1 deletions

View File

@ -183,7 +183,7 @@ export function MarkdownInput ({ label, topLevel, groupClassName, onChange, setH
const currentSegment = value.substring(priorSpace + 1, nextSpace) const currentSegment = value.substring(priorSpace + 1, nextSpace)
// set the query to the current character segment and note where it appears // set the query to the current character segment and note where it appears
if (/^@\w*/.test(currentSegment)) { if (/^@[\w_]+$/.test(currentSegment)) {
setMentionQuery(currentSegment) setMentionQuery(currentSegment)
setMentionIndices({ start: priorSpace + 1, end: nextSpace }) setMentionIndices({ start: priorSpace + 1, end: nextSpace })
} else { } else {