import { marked } from "marked"; function escapeHtml(source: string): string { return source .replaceAll("&", "&") .replaceAll("<", "<") .replaceAll(">", ">") .replaceAll('"', """) .replaceAll("'", "'"); } export function renderCommunityMarkdown(source: string): string { const html = marked.parse(escapeHtml(source), { breaks: true, gfm: true }) as string; return html .replaceAll("