From df44645604b13d10d2ac352d7afe7bf061afacd6 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 +------- layouts/default.vue | 10 +++++++--- server/plugins/content.ts | 7 +++++++ server/tsconfig.json | 3 --- 4 files changed, 15 insertions(+), 13 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/layouts/default.vue b/layouts/default.vue index 0dd51f7..75d0dbe 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -52,7 +52,7 @@ \ No newline at end of file diff --git a/server/plugins/content.ts b/server/plugins/content.ts new file mode 100644 index 0000000..4fa41d1 --- /dev/null +++ b/server/plugins/content.ts @@ -0,0 +1,7 @@ +export default defineNitroPlugin((nitroApp) => { + nitroApp.hooks.hook('content:file:beforeParse', (file) => { + if (file._id.endsWith('.md')) { + file.body = file.body.replace(/\\(\[|\])/g, '$$$$') + } + }) +}) 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" -}