1
0
mirror of https://github.com/spacebarchat/client.git synced 2024-11-25 11:42:30 +01:00

fix links not opening in new tabs

This commit is contained in:
Puyodead1 2023-09-25 11:38:24 -04:00
parent 8af482cb89
commit 6573cbcc6b
No known key found for this signature in database
GPG Key ID: A4FA4FEC0DD353FC

View File

@ -125,7 +125,11 @@ const customRenderer: Partial<ReactRenderer> = {
</CodeBlock>
),
codespan: (content: string) => <code className="inline">{content}</code>,
link: (href, text) => <Link href={href}>{text}</Link>,
link: (href, text) => (
<Link href={href} target="_blank" rel="noreferrer noopener">
{text}
</Link>
),
// prevent renderer from wrapping everything in a <p> tag
paragraph: (content: React.ReactNode[]) => {
if (