Skip to content

Commit

Permalink
Bug fix: Now plus button added regex can be directly deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
CePeU committed Mar 14, 2024
1 parent d20e109 commit 1298d17
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
})
});
})
);
Expand Down

0 comments on commit 1298d17

Please sign in to comment.