From 14b662d8eb0a5bbc632d23e4d51ef8d639501cc2 Mon Sep 17 00:00:00 2001 From: valentine195 <38669521+valentine195@users.noreply.github.com> Date: Tue, 8 Feb 2022 11:20:54 -0500 Subject: [PATCH] fix: Disabled `!!!`-style syntax in settings. Legacy support will continue until version 7.0.0. --- src/settings.ts | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/settings.ts b/src/settings.ts index 7aeb66b..1bf4bf1 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -376,21 +376,17 @@ export default class AdmonitionSetting extends PluginSettingTab { e.createSpan({ text: t(", instead of using a code block.") }); + e.createEl("br"); + e.appendChild(WARNING_ICON.cloneNode(true)); + e.createEl("strong", { + text: " Legacy support only. This setting will be removed in a future version. Use the MSDoc-syntax instead." + }); }) ) .addToggle((t) => { - t.setValue(this.plugin.data.enableMarkdownProcessor).onChange( - async (v) => { - this.plugin.data.enableMarkdownProcessor = v; - if (v) { - this.plugin.enableMarkdownProcessor(); - } else { - this.plugin.disableMarkdownProcessor(); - } - this.display(); - await this.plugin.saveSettings(); - } - ); + t.setValue( + this.plugin.data.enableMarkdownProcessor + ).setDisabled(true); }); new Setting(containerEl)