import { memo } from "react"; import ReactMarkdown from "react-markdown"; import remarkGfm from "remark-gfm"; import rehypeSanitize from "rehype-sanitize"; import { CodeBlock, CopyButton } from "./code-block"; import { cn } from "../lib/utils"; export interface MarkdownProps { children: string; className?: string; } /** * Renders Markdown content with GFM support, XSS sanitisation, and * custom code block rendering via our CodeBlock component. */ export const Markdown = memo(({ children, className }: MarkdownProps) => { return (
{codeChildren}
);
}
return (