mirror of
https://github.com/busyogg/OneStepWikiLink.git
synced 2026-07-22 05:41:52 +00:00
修复切换 markdown 文档后错误匹配到当前文档名的 bug
This commit is contained in:
parent
a7ff0879f6
commit
9cc2ca54e3
3 changed files with 4 additions and 2 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "one-step-wiki-link",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"description": "一步添加 wiki 链接",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -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") {
|
||||
|
|
|
|||
Loading…
Reference in a new issue