mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
chore: about
This commit is contained in:
2
src/components/Markdown/index.tsx
vendored
2
src/components/Markdown/index.tsx
vendored
@@ -2,6 +2,7 @@ import { FC } from 'react';
|
||||
import clsx from 'clsx';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import remarkGfm from 'remark-gfm';
|
||||
import rehypeRaw from 'rehype-raw';
|
||||
import SyntaxHighlighter from 'react-syntax-highlighter';
|
||||
import agate from 'react-syntax-highlighter/dist/esm/styles/hljs/agate';
|
||||
|
||||
@@ -20,6 +21,7 @@ const Markdown: FC<MarkdownProps> = ({ children, className }) => {
|
||||
children={children}
|
||||
linkTarget="_blank"
|
||||
remarkPlugins={[remarkGfm]}
|
||||
rehypePlugins={[rehypeRaw]}
|
||||
components={{
|
||||
code({ node, inline, className, children, ...props }) {
|
||||
const match = /language-(\w+)/.exec(className || '');
|
||||
|
||||
Reference in New Issue
Block a user