Fixes handled link formatting (#36410)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
258869278e
commit
c858fc77ef
3 changed files with 60 additions and 34 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue