Fix pill generating regex

This commit is contained in:
Ajay Bura 2022-08-05 11:27:54 +05:30
parent c0a10e9b18
commit bcd2bffd0c

View file

@ -123,7 +123,7 @@ function formatAndEmojifyText(mx, roomList, roomId, text) {
formattedText = text;
}
const MXID_REGEX = /\B@\S+:\S+\.\S+/g;
const MXID_REGEX = /\B@\S+:\S+\.\S+[^.,:;?!\s]/g;
Array.from(formattedText.matchAll(MXID_REGEX))
.filter((mxidMatch) => userIdsToDisplayNames[mxidMatch[0]])
.reverse()