From 6539415a6fcb81d216dc58035ff95268ffa1fa13 Mon Sep 17 00:00:00 2001 From: chouchouji <1305974212@qq.com> Date: Wed, 4 Dec 2024 11:47:08 +0800 Subject: [PATCH] refactor(vite-plugins): optimize markdown code --- packages/varlet-vite-plugins/src/markdown.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/varlet-vite-plugins/src/markdown.ts b/packages/varlet-vite-plugins/src/markdown.ts index 19372fff7dd..acb8d6fc3d5 100644 --- a/packages/varlet-vite-plugins/src/markdown.ts +++ b/packages/varlet-vite-plugins/src/markdown.ts @@ -14,7 +14,7 @@ function htmlWrapper(html: string) { const matches = html.matchAll(/

(.*?)<\/h3>/g) const hGroup = html .replace(/

/g, () => { - const hash = transformHash(matches.next().value[1]) + const hash = transformHash(matches.next().value![1]) return `:::

#` })