From 2a164f6a32bf632bd520b489db66760b37718b11 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Fri, 6 Dec 2024 13:21:22 +0100 Subject: [PATCH] Fix import de creatures sans heure de naissance --- module/apps/rdd-import-stats.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/apps/rdd-import-stats.js b/module/apps/rdd-import-stats.js index 91ce0618..8efa0b5d 100644 --- a/module/apps/rdd-import-stats.js +++ b/module/apps/rdd-import-stats.js @@ -17,7 +17,8 @@ const XREGEXP_COMP_CREATURE = WHITESPACES + "(?\\d+)" // Skill parser depending on the type of actor const compParser = { - personnage: "(\\D+)*" + WHITESPACES + NUMERIC_VALUE, + //personnage: "(\\D+)*" + WHITESPACES + NUMERIC_VALUE, + personnage: WHITESPACES + NUMERIC_VALUE, creature: XREGEXP_COMP_CREATURE, entite: XREGEXP_COMP_CREATURE } @@ -379,7 +380,7 @@ export class RdDStatBlockParser { case "personnage": // Check if ',né le' is present let namePersonnage = "Importé" - if (statString.match(/, né le/)) { + if (statString.match(/,\\s+né/)) { // Name is all string before first comma ',' namePersonnage = XRegExp.exec(statString, XRegExp("(?[\\p{Letter}\\s\\d]+),", 'giu')); } else {