From af25cf1d7c1459cbfb83e287d41effc8204b6952 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 27 Sep 2022 11:59:07 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E8=B6=85=E9=93=BE=E6=8E=A5=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E6=9B=B4=E5=A5=BD=E5=9C=B0=E5=85=BC=E5=AE=B9=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E8=B7=AF=E5=BE=84=20Fix=20https://github.com/siyuan-n?= =?UTF-8?q?ote/siyuan/issues/5980?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/util/pathName.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/util/pathName.ts b/app/src/util/pathName.ts index 465c88b9c..5e0aaaf9d 100644 --- a/app/src/util/pathName.ts +++ b/app/src/util/pathName.ts @@ -37,7 +37,8 @@ export const isLocalPath = (link: string) => { if (!link) { return false; } - return link.startsWith("assets/") || link.startsWith("file://"); + return link.startsWith("assets/") || link.startsWith("file://") || + 0 < link.indexOf(":/") || link.startsWith("\\\\"); // 超链接地址更好地兼容本地路径 https://github.com/siyuan-note/siyuan/issues/5980 }; export const pathPosix = () => {