Fix user popover if mention inside link (#1245)

This commit is contained in:
ekzyis 2024-06-23 19:15:26 +02:00 committed by GitHub
parent 923b21610f
commit 3f6581f119
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -200,8 +200,10 @@ export default memo(function Text ({ rel, imgproxyUrls, children, tab, itemId, o
)
}
if (text.startsWith?.('@')) {
// user mention might be within a markdown link like this: [@user foo bar](url)
const name = text.replace('@', '').split(' ')[0]
return (
<UserPopover name={text.replace('@', '')}>
<UserPopover name={name}>
<Link
id={props.id}
href={href}