import React from "react"; type Props = { markdown?: string; html?: string; }; export function LegalMarkdown({ markdown = '', html }: Props) { const derived = React.useMemo(() => { if (html && html.trim().length > 0) { return html; } const escaped = markdown .replace(/&/g, '&') .replace(//g, '>'); return escaped .split(/\n{2,}/) .map((block) => `

${block.replace(/\n/g, '
')}

`) .join('\n'); }, [markdown, html]); return (
); }