mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-19 12:10:17 +09:00
14 lines
473 B
TypeScript
14 lines
473 B
TypeScript
import ReactMarkdown from "react-markdown";
|
|
import "katex/dist/katex.min.css";
|
|
import RemarkMath from "remark-math";
|
|
import RehypeKatex from "rehype-katex";
|
|
import RemarkGfm from 'remark-gfm'
|
|
import RehypePrsim from 'rehype-prism-plus'
|
|
|
|
export function Markdown(props: { content: string }) {
|
|
return (
|
|
<ReactMarkdown remarkPlugins={[RemarkMath, RemarkGfm]} rehypePlugins={[RehypeKatex, RehypePrsim]}>
|
|
{props.content}
|
|
</ReactMarkdown>
|
|
);
|
|
} |