From 679a55471532113c31e28581a9632afe01a7a3d1 Mon Sep 17 00:00:00 2001 From: Simon C Date: Wed, 2 Feb 2022 17:41:15 +0100 Subject: [PATCH] Revert "fix: Remove richtypo on head" This reverts commit abc114f66a2b3f4ea71fcc7a194344b6f2d673ed. --- scripts/typo.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/typo.js b/scripts/typo.js index 624437b..577c0d4 100644 --- a/scripts/typo.js +++ b/scripts/typo.js @@ -27,11 +27,8 @@ 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) { - const body = rt(regEx.exec(page.content)[1]) - page.content = page.content.replace(bodyRegex, body) + page.content = rt(page.content) } savePages(pages);