diff --git a/src/node/markdown/plugins/containers.ts b/src/node/markdown/plugins/containers.ts index b9397581..d90f4db3 100644 --- a/src/node/markdown/plugins/containers.ts +++ b/src/node/markdown/plugins/containers.ts @@ -41,15 +41,13 @@ function createContainer( render(tokens, idx) { const token = tokens[idx] const info = token.info.trim().slice(klass.length).trim() + const attrs = md.renderer.renderAttrs(token) if (token.nesting === 1) { const title = md.renderInline(info || defaultTitle) - if (klass === 'details') { - return `
${title}\n` - } - return `

${title}

\n` - } else { - return klass === 'details' ? `
\n` : `\n` - } + if (klass === 'details') + return `
${title}\n` + return `

${title}

\n` + } else return klass === 'details' ? `
\n` : `\n` } } ]