diff --git a/scripts/typo.js b/scripts/typo.js index 577c0d4..624437b 100644 --- a/scripts/typo.js +++ b/scripts/typo.js @@ -27,8 +27,11 @@ const rt = richtypo.default([frRules.default, quotes]); const folder = path.resolve(process.cwd(), 'public') loadPages(folder).then(pages => { + const bodyRegex = '(.*)' + const regEx = new RegExp(`${bodyRegex}`, "ig") for (const page of pages) { - page.content = rt(page.content) + const body = rt(regEx.exec(page.content)[1]) + page.content = page.content.replace(bodyRegex, body) } savePages(pages);