From c2179e29e0bff0caf0fdc919e767d11b5ccdaa85 Mon Sep 17 00:00:00 2001 From: Lucas Winther Date: Tue, 18 Aug 2026 02:47:35 +0200 Subject: [PATCH] fix: failing test case. --- src/ingest/parsers/fandom.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ingest/parsers/fandom.ts b/src/ingest/parsers/fandom.ts index 231ea8c..8e33c7f 100644 --- a/src/ingest/parsers/fandom.ts +++ b/src/ingest/parsers/fandom.ts @@ -88,7 +88,7 @@ function parseFgoEventsPage(rendered: string, ctx: ParseContext): GachaEvent[] { for (const match of flat.matchAll(ONGOING_BLOCK)) { const href = match[1] ?? ""; const titleHtml = match[2] ?? ""; - const title = text(titleHtml).trim(); + const title = text(titleHtml).normalize("NFKC").trim(); if (!title || /permanent/i.test(title)) continue; let rawDate = text(match[3] ?? "").replace(/ /g, " ").replace(/~/g, "-").replace(/JST/i, "").trim(); @@ -151,7 +151,8 @@ function parseFgoEventsPage(rendered: string, ctx: ParseContext): GachaEvent[] { const imgTdHtml = blockMatch[2] ?? ""; const dateTdHtml = blockMatch[3] ?? ""; - const title = text(thHtml).trim(); + // Normalize NFKC immediately so it matches the sanitizer's fixed point. + const title = text(thHtml).normalize("NFKC").trim(); if (!title) continue; let rawDate = text(dateTdHtml).replace(/ /g, " ").replace(/~/g, "-").trim();