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