Import de Nom avec tiret de séparation

This commit is contained in:
Vincent Vandemeulebrouck 2024-12-14 01:02:19 +01:00
parent c577fa5f29
commit a87a4d371e

View File

@ -479,12 +479,12 @@ export class RdDStatBlockParser {
let namePersonnage = "Importé"
if (statString.includes(", né")) {
// Name is all string before first comma ','
namePersonnage = XRegExp.exec(statString, XRegExp("(?<value>[\\p{Letter}\\s\\d]+),", 'giu'));
namePersonnage = XRegExp.exec(statString, XRegExp("(?<value>[\\p{Letter}\\-\\s\\d]+),", 'giu'));
} else {
namePersonnage = XRegExp.exec(statString, XRegExp("(?<value>[\\p{Letter}\\s\\d]+)\\s+TAILLE", 'giu'));
namePersonnage = XRegExp.exec(statString, XRegExp("(?<value>[\\p{Letter}\\-\\s\\d]+)\\s+TAILLE", 'giu'));
}
if (namePersonnage?.value) {
return Misc.upperFirst(namePersonnage?.value);
return Misc.upperFirst(namePersonnage?.value.toLowerCase());
}
}
const name = XRegExp.exec(statString, XRegExp("(?<value>.+)\\s+taille", 'giu'));