diff --git a/main.ts b/main.ts index 5099f81..5d3b82b 100644 --- a/main.ts +++ b/main.ts @@ -80,12 +80,10 @@ export default class Linkify extends Plugin { await this.saveData(this.settings); } - // Unregisters any existing LinkifyPlugins and registers new ones constructed from the rules. + // Creates new LinkifyViewPlugins and registers them. refreshExtensions() { - // Note: unregisterEditorExtension is not part of the public Obsidian API. - this.viewPlugins.forEach((plugin) => { (this.app.workspace).unregisterEditorExtension(plugin); }); this.viewPlugins = this.settings.rules.map(createViewPlugin); - this.viewPlugins.forEach((plugin) => { this.registerEditorExtension(plugin); }); + this.registerEditorExtension(this.viewPlugins) } // Opens linkified text as a link. diff --git a/manifest.json b/manifest.json index ffb5a09..e46e7b6 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "linkify", "name": "Linkify", - "version": "1.0.8", + "version": "1.0.9", "minAppVersion": "0.13.0", "description": "Converts matching text into links.", "author": "matthewhchan", diff --git a/package.json b/package.json index 3458747..4f53a69 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "linkify", - "version": "1.0.8", + "version": "1.0.9", "description": "Turns strings into links.", "main": "main.js", "scripts": {