Fixes handled link formatting (#36410)

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Echo 2025-10-09 16:31:13 +02:00 committed by GitHub
commit c858fc77ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 60 additions and 34 deletions

View file

@ -204,7 +204,7 @@ class StatusContent extends PureComponent {
this.node = c;
};
handleElement = (element, { key, ...props }) => {
handleElement = (element, { key, ...props }, children) => {
if (element instanceof HTMLAnchorElement) {
const mention = this.props.status.get('mentions').find(item => element.href === item.get('url'));
return (
@ -215,7 +215,9 @@ class StatusContent extends PureComponent {
hashtagAccountId={this.props.status.getIn(['account', 'id'])}
mention={mention?.toJSON()}
key={key}
/>
>
{children}
</HandledLink>
);
} else if (element instanceof HTMLParagraphElement && element.classList.contains('quote-inline')) {
return null;