From eada8ca593f225e3e8da587560b4f4f3759fd397 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 13 Feb 2025 15:25:30 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/14052 --- app/src/editor/openLink.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/editor/openLink.ts b/app/src/editor/openLink.ts index 327f1a4aa..29eee6a52 100644 --- a/app/src/editor/openLink.ts +++ b/app/src/editor/openLink.ts @@ -26,8 +26,10 @@ export const openLink = (protyle: IProtyle, aLink: string, event?: MouseEvent, c /// #else if (isLocalPath(linkAddress)) { if (Constants.SIYUAN_ASSETS_EXTS.includes(pathPosix().extname(linkAddress)) && - (!linkAddress.endsWith(".pdf") || - (linkAddress.endsWith(".pdf") && !linkAddress.startsWith("file://"))) + ( + !linkAddress.endsWith(".pdf") || + (linkAddress.endsWith(".pdf") && linkAddress.startsWith("assets/")) + ) ) { if (event && event.altKey) { openAsset(protyle.app, linkAddress, pdfParams);