Open markdown link in a new tab

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-10-23 14:21:37 +02:00
parent 4c96929af0
commit 8302b11614
2 changed files with 16 additions and 0 deletions

View File

@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
## Unreleased
### Changed
- Markdown links now open in new tab with security attributes
## [0.77.0] - 2025-10-23
### Added

View File

@@ -12,6 +12,18 @@ export function Markdown({ content }: Props) {
<ReactMarkdown
remarkPlugins={[remarkGfm]}
rehypePlugins={[rehypeRaw]}
components={{
a: ({ href, children, ...props }) => (
<a
href={href}
target="_blank"
rel="noopener noreferrer"
{...props}
>
{children}
</a>
),
}}
>
{content}
</ReactMarkdown>