Bisaya kurs korrekturen
All checks were successful
Deploy to production / deploy (push) Successful in 2m41s

This commit is contained in:
Torsten Schulz (local)
2026-06-06 13:16:04 +02:00
parent bfec885a1f
commit 973fcaaf9e
5 changed files with 443 additions and 19 deletions

View File

@@ -156,6 +156,7 @@
<script>
import DialogWidget from '@/components/DialogWidget.vue';
import apiClient from '@/utils/axios.js';
import { normalizeComparableWithNumberWords } from '@/utils/numberAnswerVariants.js';
const PRACTICE_MIN_EXPOSURES = 3;
const SRS_SESSION_STORAGE_VERSION = 2;
@@ -630,14 +631,17 @@ export default {
}
},
normalize(s) {
const normalized = String(s || '')
.trim()
.toLowerCase()
.normalize('NFKC')
.replace(/[\p{P}\p{S}]+/gu, ' ')
.replace(/\s+/g, ' ')
.trim();
return normalized.replace(/\s+/g, '');
const baseNormalize = (value) => {
const normalized = String(value || '')
.trim()
.toLowerCase()
.normalize('NFKC')
.replace(/[\p{P}\p{S}]+/gu, ' ')
.replace(/\s+/g, ' ')
.trim();
return normalized.replace(/\s+/g, '');
};
return normalizeComparableWithNumberWords(s, baseNormalize);
},
isInstructionLikeText(value) {
const text = String(value || '').trim();