add support for external images in chat #235
This commit is contained in:
@@ -2,6 +2,7 @@ import * as React from 'react';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import remarkMath from 'remark-math'
|
||||
import rehypeKatex from 'rehype-katex'
|
||||
import rehypeRaw from 'rehype-raw'
|
||||
import 'katex/dist/katex.min.css' // `rehype-katex` does not import the CSS for you
|
||||
import gfm from "remark-gfm";
|
||||
|
||||
@@ -9,7 +10,7 @@ function Markdown(props) {
|
||||
const newProps = {
|
||||
...props,
|
||||
remarkPlugins: [...props.remarkPlugins ?? [], remarkMath, gfm],
|
||||
rehypePlugins: [...props.remarkPlugins ?? [], rehypeKatex],
|
||||
rehypePlugins: [...props.remarkPlugins ?? [], rehypeKatex, rehypeRaw],
|
||||
};
|
||||
return (
|
||||
<ReactMarkdown {...newProps} className="markdown" />
|
||||
|
||||
Reference in New Issue
Block a user