You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
527 B
21 lines
527 B
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, { ignoreMissing: true }],
|
|
]}
|
|
>
|
|
{props.content}
|
|
</ReactMarkdown>
|
|
);
|
|
}
|