fix(vocabService): skip multi-word learning items in SRS item processing
All checks were successful
Deploy to production / deploy (push) Successful in 1m57s

This commit is contained in:
Torsten Schulz (local)
2026-05-21 13:23:19 +02:00
parent 98ef2f29a0
commit 38ebeb084d

View File

@@ -2672,6 +2672,11 @@ export default class VocabService {
let maxNum = list.reduce((m, ex) => Math.max(m, Number(ex.exerciseNumber) || 0), 0);
const augmentedRows = rows.map((r) => ({ ...r, allReferences }));
for (const row of augmentedRows) {
// Skip multi-word learning items (they are sentences, not single lexemes)
const learningText = String(row.learning || '').trim();
if (!learningText || learningText.split(/\s+/).length > 1) {
continue;
}
if (this._lexemePairCoveredByMultipleChoice(list, row.learning, row.reference)) {
continue;
}