diff --git a/manifest.json b/manifest.json index 03a3ce8..b7ac4d6 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "mediaviewer", "name": "Media Viewer", - "version": "1.9.2", + "version": "1.9.3", "minAppVersion": "1.1.0", "description": "View and manage media files within your notes.", "author": "Devon22", diff --git a/package-lock.json b/package-lock.json index f06b9be..3eaf08a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mediaviewer", - "version": "1.9.2", + "version": "1.9.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "mediaviewer", - "version": "1.9.2", + "version": "1.9.3", "license": "MIT", "devDependencies": { "@types/node": "^16.11.6", diff --git a/package.json b/package.json index 6cf5bd2..3d9db19 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mediaviewer", - "version": "1.9.2", + "version": "1.9.3", "description": "This is a sample plugin for Obsidian (https://obsidian.md)", "main": "main.js", "scripts": { diff --git a/src/galleryBlock.ts b/src/galleryBlock.ts index c9318b9..b88bb95 100644 --- a/src/galleryBlock.ts +++ b/src/galleryBlock.ts @@ -174,7 +174,7 @@ export class GalleryBlock { // 檢查是否為內部連結 [[note]] const internalLinkMatch = titleText.match(/\[\[(.*?)(?:\|.*?)?\]\]/); if (internalLinkMatch) { - const linktext = internalLinkMatch[1].split('|')[0]; + const linktext = internalLinkMatch[1].split('|')[0].split('#')[0]; const file = this.app.metadataCache.getFirstLinkpathDest(linktext, ''); containerTitle = { text: linktext, @@ -210,7 +210,7 @@ export class GalleryBlock { // 檢查是否為內部連結 const internalLinkMatch = titleText.match(/\[\[(.*?)(?:\|.*?)?\]\]/); if (internalLinkMatch) { - const linktext = internalLinkMatch[1].split('|')[0]; + const linktext = internalLinkMatch[1].split('|')[0].split('#')[0]; const file = this.app.metadataCache.getFirstLinkpathDest(linktext, ''); currentTitle = { text: linktext, diff --git a/versions.json b/versions.json index 67c1c4b..9fa0882 100644 --- a/versions.json +++ b/versions.json @@ -1,3 +1,3 @@ { - "1.9.2": "1.1.0" + "1.9.3": "1.1.0" } \ No newline at end of file