export function nl2br(text: string): string { return text.replace(/(?:\r\n|\r|\n)/g, ""); } export function flattenHTMLParagraphs(html: string): string { return html.replace("
", "").replace(/\/p>/g, ""); }