From a01fd88f135da908e22517e68bb4cc7d913d97cb Mon Sep 17 00:00:00 2001 From: Kodai Nakamura Date: Thu, 20 Feb 2025 21:53:19 +0900 Subject: [PATCH] refactor: simplify command IDs in Automatic Linker Plugin --- src/main.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main.ts b/src/main.ts index 8eb052b..a85ab14 100644 --- a/src/main.ts +++ b/src/main.ts @@ -179,7 +179,7 @@ export default class AutomaticLinkerPlugin extends Plugin { // Command: Manually trigger link replacement for the current file. this.addCommand({ - id: "automatic-linker:link-current-file", + id: "link-current-file", name: "Link current file", editorCallback: async () => { try { @@ -191,7 +191,7 @@ export default class AutomaticLinkerPlugin extends Plugin { }); this.addCommand({ - id: "automatic-linker:rebuild-all-files", + id: "rebuild-all-files", name: "rebuild all files", editorCallback: async () => { try { @@ -249,8 +249,6 @@ export default class AutomaticLinkerPlugin extends Plugin { } async onunload() { - this.removeCommand("automatic-linker:link-current-file"); - this.removeCommand("automatic-linker:rollback-last-change"); // Restore original save command callback const saveCommandDefinition = // @ts-expect-error