diff --git a/src/settings/settings.ts b/src/settings/settings.ts index be07fdf..342fbf0 100644 --- a/src/settings/settings.ts +++ b/src/settings/settings.ts @@ -138,6 +138,30 @@ export class AutomaticLinkerPluginSettingsTab extends PluginSettingTab { }); }); + // Add excluding dirs that you wish to exclude from the automatic linking + new Setting(containerEl) + .setName("Exclude directories from automatic linking") + .setDesc( + "Directories to be excluded from automatic linking, one per line (e.g., 'Templates')", + ) + .addTextArea((text) => { + text.setPlaceholder("") + .setValue( + this.plugin.settings.excludeDirsFromAutoLinking.join( + "\n", + ), + ) + .onChange(async (value) => { + // Split by newlines and filter out empty lines + const dirs = value + .split("\n") + .map((dir) => dir.trim()) + .filter(Boolean); + this.plugin.settings.excludeDirsFromAutoLinking = dirs; + await this.plugin.saveData(this.plugin.settings); + }); + }); + new Setting(containerEl) .setName("URL Formatting for GitHub") .setHeading(); @@ -243,30 +267,6 @@ export class AutomaticLinkerPluginSettingsTab extends PluginSettingTab { }); }); - // Add excluding dirs that you wish to exclude from the automatic linking - new Setting(containerEl) - .setName("Exclude directories from automatic linking") - .setDesc( - "Directories to be excluded from automatic linking, one per line (e.g., 'Templates')", - ) - .addTextArea((text) => { - text.setPlaceholder("") - .setValue( - this.plugin.settings.excludeDirsFromAutoLinking.join( - "\n", - ), - ) - .onChange(async (value) => { - // Split by newlines and filter out empty lines - const dirs = value - .split("\n") - .map((dir) => dir.trim()) - .filter(Boolean); - this.plugin.settings.excludeDirsFromAutoLinking = dirs; - await this.plugin.saveData(this.plugin.settings); - }); - }); - new Setting(containerEl) .setName("Igonre domains") .setDesc(