From 9f08511539c126653360c89d5205ec8b89ffc65e Mon Sep 17 00:00:00 2001 From: wz <44930227+wenlzhang@users.noreply.github.com> Date: Tue, 25 Mar 2025 09:27:19 +0100 Subject: [PATCH] Improve code format --- src/main.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main.ts b/src/main.ts index 6a02fe4..70fc268 100644 --- a/src/main.ts +++ b/src/main.ts @@ -115,9 +115,13 @@ export default class TagIndexPlugin extends Plugin { onunload() { // Clean up resources when the plugin is disabled - console.log('Unloading Tag Index plugin'); + console.log("Unloading Tag Index plugin"); // Remove the context menu event listener - document.removeEventListener("contextmenu", this.contextMenuHandler, true); + document.removeEventListener( + "contextmenu", + this.contextMenuHandler, + true, + ); } // Helper to find a tag at the cursor position @@ -143,7 +147,10 @@ export default class TagIndexPlugin extends Plugin { setupTagPaneContextMenu() { // This handler function gets the same menu that Tag Wrangler uses - const handleContextMenu = (event: ExtendedMouseEvent, target: HTMLElement) => { + const handleContextMenu = ( + event: ExtendedMouseEvent, + target: HTMLElement, + ) => { // In the tag pane, the data-tag attribute contains the actual tag name const dataTag = target.getAttribute("data-tag");