diff --git a/src/shared/markdown.ts b/src/shared/markdown.ts index 24a62a5e..4678a066 100644 --- a/src/shared/markdown.ts +++ b/src/shared/markdown.ts @@ -63,10 +63,9 @@ const spoilerConfig = { render: (tokens: any, idx: any) => { const m = tokens[idx].info.trim().match(/^spoiler\s+(.*)$/); - const summary = mdToHtmlInline(md.utils.escapeHtml(m[1])).__html; - if (tokens[idx].nesting === 1) { // opening tag + const summary = mdToHtmlInline(md.utils.escapeHtml(m[1])).__html; return `
${summary} \n`; } else { // closing tag