Implement mentions rendering

This commit is contained in:
Paul Frazee
2022-10-03 16:02:03 -05:00
parent ba417935f0
commit 7de013f467
7 changed files with 177 additions and 19 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ export function Component({replyTo}: {replyTo?: string}) {
const textDecorated = useMemo(() => {
return (text || '').split(/(\s)/g).map((item, i) => {
if (/@[a-zA-Z0-9]+/g.test(item)) {
if (/^@[a-zA-Z0-9\.-]+$/g.test(item)) {
return (
<Text key={i} style={{color: colors.blue3}}>
{item}