diff --git a/apps/api/src/integrations/pl24/pl24.service.ts b/apps/api/src/integrations/pl24/pl24.service.ts index ca1f545..bb97b93 100644 --- a/apps/api/src/integrations/pl24/pl24.service.ts +++ b/apps/api/src/integrations/pl24/pl24.service.ts @@ -66,13 +66,20 @@ const LEGACY_ARCH_SOURCE_TAG: Record = { * single spelling matches both "Model yılı" and "MODEL YILI". */ export function normalizeLabel(label: string): string { - return label - .toLocaleLowerCase("tr") - .normalize("NFD") - .replace(/[\u0300-\u036f]/g, "") - .replace(/ı/g, "i") - .replace(/[\s/]+/g, "_") - .trim(); + return ( + label + .toLocaleLowerCase("tr") + .normalize("NFD") + // \p{M} (all combining marks) rather than the U+0300–U+036F range: the range + // is a character class that can also match a base character followed by a + // combining one, which biome flags as misleading. NFD has already split every + // accent into its own mark, so matching marks directly is both correct and + // broader (Turkish, Latin-Extended, anything PL24 sends). + .replace(/\p{M}/gu, "") + .replace(/ı/g, "i") + .replace(/[\s/]+/g, "_") + .trim() + ); } /**