From 907fab900cff5c14633b6db2e6a9447de52166d7 Mon Sep 17 00:00:00 2001 From: chencu5958 <82279230+chencu5958@users.noreply.github.com> Date: Mon, 23 Mar 2026 20:23:08 +0800 Subject: [PATCH 1/2] feat(markdown): add missing note, important, caution containers --- __tests__/e2e/markdown-extensions/index.md | 12 ++++++++++++ src/node/markdown/plugins/containers.ts | 9 +++++++++ 2 files changed, 21 insertions(+) diff --git a/__tests__/e2e/markdown-extensions/index.md b/__tests__/e2e/markdown-extensions/index.md index 3446b4efd..c95d60e03 100644 --- a/__tests__/e2e/markdown-extensions/index.md +++ b/__tests__/e2e/markdown-extensions/index.md @@ -56,6 +56,18 @@ This is a dangerous warning. This is a details block. ::: +::: note +This is a note. +::: + +::: important +This is an important note. +::: + +::: caution +This is a caution note. +::: + ### Custom Title ::: danger STOP diff --git a/src/node/markdown/plugins/containers.ts b/src/node/markdown/plugins/containers.ts index 39efce17f..20a491676 100644 --- a/src/node/markdown/plugins/containers.ts +++ b/src/node/markdown/plugins/containers.ts @@ -14,6 +14,15 @@ export const containerPlugin = ( .use(...createContainer('warning', options?.warningLabel || 'WARNING', md)) .use(...createContainer('danger', options?.dangerLabel || 'DANGER', md)) .use(...createContainer('details', options?.detailsLabel || 'Details', md)) + .use(...createContainer('note', options?.noteLabel || 'NOTE', md)) + .use( + ...createContainer( + 'important', + options?.importantLabel || 'IMPORTANT', + md + ) + ) + .use(...createContainer('caution', options?.cautionLabel || 'CAUTION', md)) // explicitly escape Vue syntax .use(container, 'v-pre', { render: (tokens: Token[], idx: number) => From bbdcb913e06cefd67a9b930b771228601a3fa563 Mon Sep 17 00:00:00 2001 From: chencu <82279230+chencu5958@users.noreply.github.com> Date: Mon, 23 Mar 2026 20:36:40 +0800 Subject: [PATCH 2/2] fix(format) format correction --- src/node/markdown/plugins/containers.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/node/markdown/plugins/containers.ts b/src/node/markdown/plugins/containers.ts index 20a491676..e3eb53fb7 100644 --- a/src/node/markdown/plugins/containers.ts +++ b/src/node/markdown/plugins/containers.ts @@ -15,13 +15,7 @@ export const containerPlugin = ( .use(...createContainer('danger', options?.dangerLabel || 'DANGER', md)) .use(...createContainer('details', options?.detailsLabel || 'Details', md)) .use(...createContainer('note', options?.noteLabel || 'NOTE', md)) - .use( - ...createContainer( - 'important', - options?.importantLabel || 'IMPORTANT', - md - ) - ) + .use(...createContainer('important', options?.importantLabel || 'IMPORTANT', md)) .use(...createContainer('caution', options?.cautionLabel || 'CAUTION', md)) // explicitly escape Vue syntax .use(container, 'v-pre', {