From 1538692f877a41ce0905de37325394b5ad8e1a30 Mon Sep 17 00:00:00 2001 From: chakAs3 Date: Sat, 27 Jan 2024 11:38:21 +0400 Subject: [PATCH] add required option to baseParser --- code/renderers/vue3/src/docs/sourceDecorator.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/renderers/vue3/src/docs/sourceDecorator.ts b/code/renderers/vue3/src/docs/sourceDecorator.ts index adb20ae68755..52303c553427 100644 --- a/code/renderers/vue3/src/docs/sourceDecorator.ts +++ b/code/renderers/vue3/src/docs/sourceDecorator.ts @@ -172,7 +172,10 @@ function getTemplateComponents( } function getComponents(template: string): (TemplateChildNode | VNode)[] { - const ast = baseParse(template); + const ast = baseParse(template, { + isNativeTag: () => true, + decodeEntities: (rawtext, asAttr) => rawtext, + }); const components = ast?.children; if (!components) return []; return components;