Open markdown link in a new tab
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user