fix: markdonw link

This commit is contained in:
archer
2023-08-14 10:21:20 +08:00
parent 0d7022026b
commit d4d9e1fe65
2 changed files with 1 additions and 34 deletions

View File

@@ -9,7 +9,6 @@ import 'katex/dist/katex.min.css';
import styles from './index.module.scss';
import dynamic from 'next/dynamic';
import Link from './Link';
import CodeLight from './CodeLight';
const MermaidCodeBlock = dynamic(() => import('./img/MermaidCodeBlock'));
@@ -50,7 +49,6 @@ const Markdown = ({
}) => {
const components = useMemo(
() => ({
a: Link,
img: Image,
pre: 'div',
p: 'div',
@@ -68,6 +66,7 @@ const Markdown = ({
rehypePlugins={[RehypeKatex]}
// @ts-ignore
components={components}
linkTarget={'_blank'}
>
{source}
</ReactMarkdown>