From 9f271f356923f986bf68533b13c9ed24af74cfae Mon Sep 17 00:00:00 2001 From: Kiyo5hi <44930252+Kiyo5hi@users.noreply.github.com> Date: Tue, 31 Oct 2023 21:27:18 -0700 Subject: [PATCH] chore(*): adapt "\[\]" syntax --- content/math-3a/index.md | 8 +------- server/plugins/content.ts | 8 ++++++++ server/tsconfig.json | 3 --- 3 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 server/plugins/content.ts delete mode 100644 server/tsconfig.json diff --git a/content/math-3a/index.md b/content/math-3a/index.md index 45d14f4..48612a0 100644 --- a/content/math-3a/index.md +++ b/content/math-3a/index.md @@ -1,9 +1,3 @@ --- title: MATH 3A ---- - -::Theorem{tag="Test"} -This is a test -:: - -Check Theorem :Reference{tag="Test"}. +--- \ No newline at end of file diff --git a/server/plugins/content.ts b/server/plugins/content.ts new file mode 100644 index 0000000..1a56022 --- /dev/null +++ b/server/plugins/content.ts @@ -0,0 +1,8 @@ +export default defineNitroPlugin((nitroApp) => { + nitroApp.hooks.hook('content:file:beforeParse', (file) => { + if (file._id.endsWith('.md')) { + file.body = file.body.replace(/\\(\[|\])/g, '\$\$') + } + }) + }) + \ No newline at end of file diff --git a/server/tsconfig.json b/server/tsconfig.json deleted file mode 100644 index b9ed69c..0000000 --- a/server/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../.nuxt/tsconfig.server.json" -}