From f90dddfbf8504fb2b3d9c0d040a3410d4cf3b70e Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 14 Dec 2024 23:20:53 +0100 Subject: [PATCH] Le nom peut contenir une apostrophe --- module/apps/rdd-import-stats.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/apps/rdd-import-stats.js b/module/apps/rdd-import-stats.js index 4cff1ab7..5c1b69a2 100644 --- a/module/apps/rdd-import-stats.js +++ b/module/apps/rdd-import-stats.js @@ -479,9 +479,9 @@ export class RdDStatBlockParser { let namePersonnage = "Importé" if (statString.includes(", né")) { // Name is all string before first comma ',' - namePersonnage = XRegExp.exec(statString, XRegExp("(?[\\p{Letter}\\-\\s\\d]+),", 'giu')); + namePersonnage = XRegExp.exec(statString, XRegExp("(?[\\p{Letter}\\'\\-\\s\\d]+),", 'giu')); } else { - namePersonnage = XRegExp.exec(statString, XRegExp("(?[\\p{Letter}\\-\\s\\d]+)\\s+TAILLE", 'giu')); + namePersonnage = XRegExp.exec(statString, XRegExp("(?[\\p{Letter}\\'\\-\\s\\d]+)\\s+TAILLE", 'giu')); } if (namePersonnage?.value) { return Misc.upperFirst(namePersonnage?.value.toLowerCase());