From 2f6f499d38e7d4c3c648c9cf23fd2de7df25be62 Mon Sep 17 00:00:00 2001 From: Yuna-Celisse <29951517@qq.com> Date: Sun, 25 Oct 2026 16:46:07 +0800 Subject: [PATCH] feat(editor): check Markdown and render Mermaid previews --- .vitepress/theme/EditPage.vue | 273 +++++++++++++++++++++++- .vitepress/theme/editor/codemirror.ts | 50 ++++- .vitepress/theme/editor/preview.ts | 86 ++++++++ .vitepress/theme/style.css | 45 ++++ checks/editor-validation.test.ts | 24 +++ package.json | 1 + pnpm-lock.yaml | 3 + tutorial/manual/writing-documents.md | 10 +- utils/markdown-validation.test.ts | 78 +++++++ utils/markdown-validation.ts | 295 ++++++++++++++++++++++++++ 10 files changed, 860 insertions(+), 5 deletions(-) create mode 100644 checks/editor-validation.test.ts create mode 100644 utils/markdown-validation.test.ts create mode 100644 utils/markdown-validation.ts diff --git a/.vitepress/theme/EditPage.vue b/.vitepress/theme/EditPage.vue index 95444ef9..8f811bf0 100644 --- a/.vitepress/theme/EditPage.vue +++ b/.vitepress/theme/EditPage.vue @@ -1,10 +1,13 @@