chore: fixing prettier

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2023-04-27 20:44:28 +02:00
parent c0bb87da5e
commit 79edc8e6aa
2 changed files with 8 additions and 5 deletions
+7 -4
View File
@@ -69,10 +69,13 @@ module.exports = {
],
],
markdown: {
preprocessor({ fileContent }) {
// Remove HTML comments from markdown files as they're not supported by MDX2
return fileContent.replace(/<!--.*?-->/gs, '');
}
preprocessor({ filePath, fileContent }) {
// Replace HTML comments with empty strings in files that are not in the blog folder,
// as the <!-- truncate --> syntax is backwards compatible with MDX2 in Docusarus.
if (!filePath.startsWith(`${__dirname}/blog`)) {
return fileContent.replace(/<!--.*?-->/gs, '');
}
},
},
webpack: {
jsLoader: isServer => ({
+1 -1
View File
@@ -30,7 +30,7 @@ async function main() {
if (!existsSync(referencesDir)) {
mkdirSync(referencesDir);
writeFileSync(path.join(referencesDir, 'index.md'), PLACEHOLDER);
}
}
}
main().catch(error => {