Skip to content

Commit d7d20a3

Browse files
authoredDec 16, 2020
Merge pull request #3 from dabakovich/02/regex-fix
fix: mention regex for multiple mentions
2 parents e2c4834 + 53ed261 commit d7d20a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/utils/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Change, diffChars } from 'diff';
33
import matchAll from 'string.prototype.matchall';
44
import { MentionData, Part, Position, RegexMatchResult, Suggestion } from '../types';
55

6-
const mentionRegEx = /(?<original>@\[(?<name>.+)]\((?<id>([0-9]*))\))/gi;
6+
const mentionRegEx = /(?<original>@\[(?<name>([^@[]*))]\((?<id>([0-9]*))\))/gi;
77

88
type CharactersDiffChange = Omit<Change, 'count'> & { count: number };
99

0 commit comments

Comments
 (0)
Please sign in to comment.