parent
abc114f66a
commit
679a554715
|
@ -27,11 +27,8 @@ const rt = richtypo.default([frRules.default, quotes]);
|
||||||
const folder = path.resolve(process.cwd(), 'public')
|
const folder = path.resolve(process.cwd(), 'public')
|
||||||
|
|
||||||
loadPages(folder).then(pages => {
|
loadPages(folder).then(pages => {
|
||||||
const bodyRegex = '<body>(.*)</body>'
|
|
||||||
const regEx = new RegExp(`${bodyRegex}`, "ig")
|
|
||||||
for (const page of pages) {
|
for (const page of pages) {
|
||||||
const body = rt(regEx.exec(page.content)[1])
|
page.content = rt(page.content)
|
||||||
page.content = page.content.replace(bodyRegex, body)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
savePages(pages);
|
savePages(pages);
|
||||||
|
|
Loading…
Reference in New Issue