Skip to content

Commit

Permalink
Fix tempate generation for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
naltatis committed Jan 1, 2025
1 parent 12450e9 commit 224f427
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/generateFromTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 224f427

Please sign in to comment.