Fix user popover if mention inside link (#1245)
This commit is contained in:
parent
923b21610f
commit
3f6581f119
|
@ -200,8 +200,10 @@ export default memo(function Text ({ rel, imgproxyUrls, children, tab, itemId, o
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (text.startsWith?.('@')) {
|
if (text.startsWith?.('@')) {
|
||||||
|
// user mention might be within a markdown link like this: [@user foo bar](url)
|
||||||
|
const name = text.replace('@', '').split(' ')[0]
|
||||||
return (
|
return (
|
||||||
<UserPopover name={text.replace('@', '')}>
|
<UserPopover name={name}>
|
||||||
<Link
|
<Link
|
||||||
id={props.id}
|
id={props.id}
|
||||||
href={href}
|
href={href}
|
||||||
|
|
Loading…
Reference in New Issue