fix: improve closure templates and hover styling

This commit is contained in:
Esdras Renan 2025-10-20 19:00:38 -03:00
parent 3012ad4348
commit 81657e52d8
5 changed files with 69 additions and 79 deletions

View file

@ -318,6 +318,14 @@ export function sanitizeEditorHtml(html: string): string {
}
}
export function stripLeadingEmptyParagraphs(html: string): string {
if (!html) return ""
return html.replace(
/^(?:\s|&nbsp;|&#160;|<br\s*\/?>|<p>(?:\s|&nbsp;|&#160;|<br\s*\/?>)*<\/p>)+/gi,
""
)
}
export function RichTextContent({ html, className }: { html: string; className?: string }) {
return (
<div