feat: support French epithets in character extraction logic
All checks were successful
Build Docker Image / build (push) Successful in 1m14s

This commit is contained in:
2026-03-15 22:44:45 +01:00
parent 997b2f1781
commit 94393851c8

View File

@@ -635,7 +635,9 @@ async function extractAffiliations($: cheerio.CheerioAPI, lang: string): Promise
* Handles both quoted and unquoted epithets, keeping only the main/latest readable values. * Handles both quoted and unquoted epithets, keeping only the main/latest readable values.
*/ */
function extractEpithets($: cheerio.CheerioAPI): string[] { function extractEpithets($: cheerio.CheerioAPI): string[] {
const div = $('[data-source="epithet"] .pi-data-value'); const div = $(
'[data-source="epithet"] .pi-data-value, [data-source="épithète"] .pi-data-value'
).first();
if (div.length === 0) return []; if (div.length === 0) return [];
const cleanedDiv = div.clone(); const cleanedDiv = div.clone();