From 224f4276178129e889f4d6b362547c9ea715e7eb Mon Sep 17 00:00:00 2001 From: Michael Geers Date: Wed, 1 Jan 2025 15:46:22 +0100 Subject: [PATCH] Fix tempate generation for windows --- src/generateFromTemplate.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/generateFromTemplate.js b/src/generateFromTemplate.js index 17ebfd10b..f76045c64 100644 --- a/src/generateFromTemplate.js +++ b/src/generateFromTemplate.js @@ -224,8 +224,10 @@ function generateMarkdown(data, type, translations, target) { const content = fs .readFileSync(target, "utf-8") .replace( - new RegExp(`${escapeRegExp(AUTOGEN_MARKER)}(.|\n)*`, "gm"), - `${AUTOGEN_MARKER}\n\n${generated}`, + new RegExp( + `${escapeRegExp(AUTOGEN_MARKER)}([\\s\\S])*`, + "gm", + )`${AUTOGEN_MARKER}\n\n${generated}`, ); console.log(`${type}: ${brandCounter} brands, ${productCounter} products`); fs.writeFileSync(target, content, "utf-8");