Explorar o código

:art: 超链接地址更好地兼容本地路径 Fix https://github.com/siyuan-note/siyuan/issues/5980

Liang Ding %!s(int64=2) %!d(string=hai) anos
pai
achega
af25cf1d7c
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      app/src/util/pathName.ts

+ 2 - 1
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 = () => {