Skip to content

Commit

Permalink
fix: Fixes issue preventing Settings Search from searching Admonition…
Browse files Browse the repository at this point in the history
… settings
  • Loading branch information
valentine195 committed Mar 15, 2022
1 parent d9717e1 commit d020438
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default class AdmonitionSetting extends PluginSettingTab {
});

this.additionalEl = admonitionEl.createDiv("additional");
await this.buildTypes();
this.buildTypes();

this.buildAdmonitions(
this.containerEl.createEl("details", {
Expand Down Expand Up @@ -183,7 +183,7 @@ export default class AdmonitionSetting extends PluginSettingTab {
});
}

async buildAdmonitions(containerEl: HTMLDetailsElement) {
buildAdmonitions(containerEl: HTMLDetailsElement) {
containerEl.empty();
containerEl.ontoggle = () => {
this.plugin.data.open.admonitions = containerEl.open;
Expand Down Expand Up @@ -536,8 +536,8 @@ export default class AdmonitionSetting extends PluginSettingTab {
);
}
this.plugin.data.msDocConverted = true;
await this.plugin.saveSettings();
this.display();
this.plugin.saveSettings().then(() => this.display());

setTimeout(() => {
this.notice.hide();
this.notice = undefined;
Expand All @@ -560,7 +560,7 @@ export default class AdmonitionSetting extends PluginSettingTab {
this.checkAndReplace();
});
}
async checkAndReplaceCodeBlocks() {
checkAndReplaceCodeBlocks() {
if (!this.queue.length) {
if (this.converted) {
this.notice.setMessage(
Expand Down Expand Up @@ -707,7 +707,7 @@ export default class AdmonitionSetting extends PluginSettingTab {
});
}

async buildTypes() {
buildTypes() {
this.additionalEl.empty();
for (const admonition of Object.values(
this.plugin.data.userAdmonitions
Expand Down

0 comments on commit d020438

Please sign in to comment.