Implement mentions rendering
This commit is contained in:
parent
2058505bf1
commit
195d2f7d2b
7 changed files with 177 additions and 19 deletions
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue