Vanessa 2025-02-13 15:25:30 +08:00
parent af1dac157e
commit eada8ca593

View file

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