From 10f9b39b8a76cea85ef7ee8a848328b1ba2b6203 Mon Sep 17 00:00:00 2001 From: Michael Geers Date: Wed, 1 Jan 2025 20:02:44 +0100 Subject: [PATCH] fix --- src/generateFromTemplate.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/generateFromTemplate.js b/src/generateFromTemplate.js index f76045c64..89078e652 100644 --- a/src/generateFromTemplate.js +++ b/src/generateFromTemplate.js @@ -224,10 +224,8 @@ function generateMarkdown(data, type, translations, target) { const content = fs .readFileSync(target, "utf-8") .replace( - new RegExp( - `${escapeRegExp(AUTOGEN_MARKER)}([\\s\\S])*`, - "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");