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);