From f86ac56b78da76f3061e6537b897bb13c1ed802d Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 18 Apr 2024 17:37:17 +0800 Subject: [PATCH] fix: let vue compiler handle entity decoding --- src/node/markdown/markdown.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/node/markdown/markdown.ts b/src/node/markdown/markdown.ts index 31e1750b..0d75b6ce 100644 --- a/src/node/markdown/markdown.ts +++ b/src/node/markdown/markdown.ts @@ -292,5 +292,10 @@ export const createMarkdownRenderer = async ( options.config(md) } + // disable entity decode/escape from markdown-it, as the Vue compiler already + // decodes them. + md.disable('entity') + md.renderer.rules.text = (tokens, idx) => tokens[idx].content + return md }