import { FC, memo } from 'react'; import ReactMarkdown, { Options } from 'react-markdown'; import Img from '../ui/Img'; import remarkGfm from 'remark-gfm'; import remarkMath from 'remark-math'; import rehypeRaw from 'rehype-raw'; import { CodeBlock } from '../ui/CodeBlock'; export const MemoizedReactMarkdown: FC = memo( ReactMarkdown, (prevProps, nextProps) => prevProps.children === nextProps.children && prevProps.className === nextProps.className, ); export const Markdown: React.FC<{ content: string; }> = ({ content }) => { return ( <> child.type === 'element' && child.tagName === 'img', ) ) { return (

{children}

); } return

{children}

; }, img(props) { if (props.src?.endsWith('.mp4')) { return (
); };