From fbae203201636c1d862475117f4c2eb18919e148 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Fri, 15 Dec 2023 16:50:16 +0100 Subject: [PATCH] chore: fix --- src/node/markdown/plugins/highlight.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/node/markdown/plugins/highlight.ts b/src/node/markdown/plugins/highlight.ts index d2eb77a4..17b820a1 100644 --- a/src/node/markdown/plugins/highlight.ts +++ b/src/node/markdown/plugins/highlight.ts @@ -79,7 +79,7 @@ export async function highlight( transformerNotationHighlight(), transformerNotationErrorLevel(), { - name: 'vitepress:add-vp-code-class', + name: 'vitepress:add-class', pre(node) { addClassToHast(node, 'vp-code') } @@ -157,6 +157,12 @@ export async function highlight( transformers: [ ...transformers, transformerCompactLineOptions(lineOptions), + { + name: 'vitepress:v-pre', + pre(node) { + if (vPre) node.properties['v-pre'] = '' + } + }, ...userTransformers ], meta: {