Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

670 B
Raw Blame
import ReactMarkdown, { type Components } from 'react-markdown'
import remarkGfm from 'remark-gfm'

/**
 * Renders a changelog title/summary as inline markdown (backticks → inline code).
 * `p` and `a` are unwrapped so the output is valid inside a heading and never
 * nests an anchor (titles are already wrapped in a `<Link>`).
 */
const INLINE_COMPONENTS: Components = {
  p: ({ children }) => <>{children}</>,
  a: ({ children }) => <>{children}</>,
}

export function ChangelogInlineMarkdown({ children }: { children: string }) {
  return (
    <ReactMarkdown remarkPlugins={[remarkGfm]} components={INLINE_COMPONENTS}>
      {children}
    </ReactMarkdown>
  )
}