This commit is contained in:
team3
2026-06-21 15:38:10 +02:00
parent 20831e1399
commit 1910f730d2
15 changed files with 835 additions and 172 deletions

View File

@@ -65,3 +65,9 @@ marked.use({
export function renderMarkdown(text) {
return DOMPurify.sanitize(marked.parse(text || ''))
}
// Inline-Variante (kein <p>-Wrapping) für kurze Texte wie Quiz-Optionen oder
// Lückentext-Satzteile — rendert $…$-Mathe und Markdown ohne Block-Umbruch.
export function renderMarkdownInline(text) {
return DOMPurify.sanitize(marked.parseInline(text || ''))
}