Improve Satzung content loading and HTML conversion process

This commit ensures that the Satzung content is loaded as a string, enhancing reliability. Additionally, it refines the HTML conversion function by improving the handling of line breaks, merging related lines, and removing empty paragraphs. These changes enhance the overall quality and readability of the generated HTML content.
This commit is contained in:
Torsten Schulz (local)
2026-02-06 13:35:20 +01:00
parent f7fe8595a1
commit 33ef5cda5f
2 changed files with 133 additions and 50 deletions

View File

@@ -183,12 +183,15 @@ async function loadCurrentSatzung() {
lastUpdated.value = new Date().toLocaleDateString('de-DE')
}
if (satzung?.content) {
satzungContent.value = satzung.content
// Stelle sicher, dass der Inhalt als String geladen wird
const content = typeof satzung.content === 'string' ? satzung.content : String(satzung.content || '')
satzungContent.value = content
} else {
satzungContent.value = ''
}
} catch (e) {
console.error('Fehler beim Laden der aktuellen Satzung:', e)
satzungContent.value = ''
}
}