export function MarkdownRenderer({ content }: { content: string }) { let html = content .replace(/&/g, '&') .replace(//g, '>') html = html.replace( /^```[\w]*\n([\s\S]*?)^```$/gm, (_m, code: string) => `
${code.trimEnd()}`
)
html = html.replace(
/^(\|.+\|)\n(\|[\s:|-]+\|)\n((?:\|.+\|\n?)*)/gm,
(_m, header: string, _sep: string, body: string) => {
const ths = header.split('|').filter((c: string) => c.trim()).map((c: string) =>
`$1')
html = html.replace(/^- (.+)$/gm, '$1
') return }