chore: minify html

This commit is contained in:
Cory Dransfeldt 2024-11-08 05:26:31 -08:00
parent 554ce4dd01
commit 0114acdffb
No known key found for this signature in database
2 changed files with 9 additions and 2 deletions

View file

@ -17,4 +17,10 @@ md.use(markdownItAnchor, {
safariReaderFix: true,
}),
});
md.use(markdownItFootnote);
md.use(markdownItFootnote);
export const minifyHTML = (html) =>
html
.replace(/\n\s+/g, "")
.replace(/>\s+</g, "><")
.replace(/<!--.*?-->/g, "");