mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-31 13:58:49 +01:00
This commit is contained in:
parent
af1dac157e
commit
eada8ca593
1 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue