Skip to content

Commit

Permalink
fix: selectively pass env for container titles
Browse files Browse the repository at this point in the history
closes #3007
  • Loading branch information
brc-dd committed Sep 24, 2023
1 parent bc96b2b commit 1a9c32d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/node/markdown/plugins/containers.ts
Expand Up @@ -43,7 +43,9 @@ function createContainer(
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, { ...env })
const title = md.renderInline(info || defaultTitle, {
references: env.references
})
if (klass === 'details')
return `<details class="${klass} custom-block"${attrs}><summary>${title}</summary>\n`
return `<div class="${klass} custom-block"${attrs}><p class="custom-block-title">${title}</p>\n`
Expand Down

0 comments on commit 1a9c32d

Please sign in to comment.