feat: erweitere VocabLessonView mit Glossar-Optionen und verbessere die Lückentextformatierung
All checks were successful
Deploy to production / deploy (push) Successful in 2m8s

feat: füge Skript hinzu, um doppelte Muster in Lektionen zu identifizieren
feat: implementiere Skript zur Suche nach Übungen anhand von Text
feat: erstelle Skript zur Reparatur von Multiple-Choice-Antworten
feat: implementiere Skript zum Drucken von Lehrmusterinformationen
This commit is contained in:
Torsten Schulz (local)
2026-05-22 09:43:39 +02:00
parent 0732f44c96
commit cee4492dae
5 changed files with 186 additions and 1 deletions

View File

@@ -3216,7 +3216,13 @@ export default {
// Bevorzugt: expliziter Lückentext
if (qData && qData.text) {
return qData.text.replace(/\{gap\}/g, '<span class="gap">_____</span>');
// Extrahiere eine eventuell angehängte GlossKlammer am Ende, z.B. "... (Hals / Kehle)"
const raw = String(qData.text || '');
const glossMatch = raw.match(/\(([^)]+)\)\s*$/);
const gloss = glossMatch ? glossMatch[1] : '';
const base = glossMatch ? raw.replace(/\s*\([^)]+\)\s*$/, '') : raw;
const filled = base.replace(/\{gap\}/g, '<span class="gap">_____</span>');
return gloss ? `${filled}<div class="gap-gloss">(${this.$sanitize ? this.$sanitize(gloss) : gloss})</div>` : filled;
}
// Fallbacks: Frage-Text, Erklärung oder Titel anzeigen
@@ -4556,6 +4562,12 @@ export default {
gap: 10px;
}
.gap-gloss {
margin-top: 6px;
color: var(--color-text-secondary);
font-size: 0.9em;
}
.assistant-message {
padding: 12px 14px;
border-radius: var(--radius-md);