From 9cc2ca54e318d9864bcb39deda1d20962e3e8597 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=BD=E6=9C=BD=E6=9C=BD=E6=9C=BD=E6=9C=BD?= <694253220@qq.com> Date: Tue, 1 Apr 2025 22:27:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2=20markdown?= =?UTF-8?q?=20=E6=96=87=E6=A1=A3=E5=90=8E=E9=94=99=E8=AF=AF=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=E5=88=B0=E5=BD=93=E5=89=8D=E6=96=87=E6=A1=A3=E5=90=8D?= =?UTF-8?q?=E7=9A=84=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 2 +- package.json | 2 +- src/main.ts | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) 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") {