mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
This commit is contained in:
parent
a7c617dac4
commit
21fa56e882
1 changed files with 4 additions and 0 deletions
|
|
@ -62,6 +62,10 @@ export const openFileById = async (options: {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const openAsset = (assetPath: string, page: number | string, position?: string) => {
|
export const openAsset = (assetPath: string, page: number | string, position?: string) => {
|
||||||
|
const suffix = pathPosix().extname(assetPath.split("?page")[0]);
|
||||||
|
if (!Constants.SIYUAN_ASSETS_EXTS.includes(suffix)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
openFile({
|
openFile({
|
||||||
assetPath,
|
assetPath,
|
||||||
page,
|
page,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue