From 8ac3c0124c36f7b264a194f87c470b4b970c6e2e Mon Sep 17 00:00:00 2001 From: yayapoi <674231824@qq.com> Date: Mon, 12 Jan 2026 13:13:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:In=20scenarios=20involving=20languages=20su?= =?UTF-8?q?ch=20as=20Chinese,=20Japanese,=20and=20Korean,=20for=20instance?= =?UTF-8?q?,=20when=20an=20a.md=20file=20contains=20links=20to=20other=20l?= =?UTF-8?q?ocal=20md=20files=20in=20the=20format=20of=20[=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E7=AB=A0](/=E7=AC=AC=E4=B8=80=E7=AB=A0/=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E7=AB=A0.md),=20clicking=20on=20these=20links=20fails?= =?UTF-8?q?=20to=20open=20the=20local=20md=20files=20normally.=20However,?= =?UTF-8?q?=20by=20converting=20these=20languages=20to=20UTF-8=20encoding,?= =?UTF-8?q?=20the=20md=20files=20can=20now=20be=20opened=20without=20issue?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app.ts b/src/app.ts index 3658fe9..7335236 100644 --- a/src/app.ts +++ b/src/app.ts @@ -83,9 +83,11 @@ document.addEventListener('click', (e) => { const node = findHeading(href.slice(1)); highlightNode(node); } else if (!href.includes('://')) { + // transform UTF-8 + const utf8Href = decodeURIComponent(href); vscode.postMessage({ type: 'openFile', - data: href, + data: utf8Href, }); } }