import { marked } from "marked"; marked.setOptions({ breaks: true, gfm: true, }); export function markdownToHtml(markdown: string): string { const html = marked.parse(markdown); return typeof html === "string" ? html : ""; }