import type { ComponentProps } from 'react'
import ReactMarkdown, { type ExtraProps } from 'react-markdown'
import rehypeHighlight from 'rehype-highlight'
import remarkGfm from 'remark-gfm'
import { cn } from '@/client/lib/cn'
const remarkPlugins = [remarkGfm]
const rehypePlugins = [rehypeHighlight]
const components = {
code({ node: _node, className, children, ...props }: ComponentProps<'code'> & ExtraProps) {
return (
{children}
)
},
pre({ children }: ComponentProps<'pre'>) {
return (
{children}