From 1298d17e7276c293b4671c29d2a012ee5a5c4898 Mon Sep 17 00:00:00 2001 From: CePeU Date: Thu, 14 Mar 2024 08:51:02 +0100 Subject: [PATCH] Bug fix: Now plus button added regex can be directly deleted --- src/main.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.ts b/src/main.ts index c889fbc..97d527a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -217,6 +217,13 @@ class MarkdownExportSettingTab extends PluginSettingTab { .addExtraButton((Button)=>{ Button .setIcon("trash") + .onClick(async ()=>{ + //remove array elements after trash button is pressed and refresh setting window + this.plugin.settings.RegExString.splice(NextRegexString,1); + this.plugin.settings.ReplacmentString.splice(NextReplacmentString,1); + await this.plugin.saveSettings(); + this.display(); + }) }); }) );