import { marked } from 'marked'; const renderer = new marked.Renderer(); renderer.code = function(code: string, infostring: string | undefined, escaped: boolean) { const lang = infostring?.split(' ')[0]; if (lang === 'mermaid') { return `
${code}`;
};
marked.setOptions({ renderer });
export function convertMarkdownToHtml(markdown: string): string {
return marked.parse(markdown) as string;
}