diff --git a/manifest.json b/manifest.json index b2c9cfd..de0da85 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "one-step-wiki-link", "name": "One Step Wiki Link", - "version": "1.0.1", + "version": "1.0.2", "minAppVersion": "1.8.0", "description": "一步添加 wiki 链接", "author": "Busyo", diff --git a/package.json b/package.json index 739cd9c..0c26981 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "one-step-wiki-link", - "version": "1.0.1", + "version": "1.0.2", "description": "一步添加 wiki 链接", "main": "main.js", "scripts": { diff --git a/src/main.ts b/src/main.ts index e308de2..7e6c5dd 100644 --- a/src/main.ts +++ b/src/main.ts @@ -102,6 +102,8 @@ export default class OneStepWikiLinkPlugin extends Plugin { this.openEditor = leaf.view.app.workspace.activeEditor?.editor; // console.log(this.openEditor); if (this.openEditor) { + this.currentFileName = ((leaf.view as MarkdownView).file as TFile).basename; + // console.log((leaf.view as MarkdownView).file?.basename); this.checkContent(this.openEditor.getValue()); } } else if (type == "empty") {