Skip to content

Commit 7fbfe71

Browse files
committedSep 23, 2023
fix: handle references in container titles
closes #3004
1 parent 0d56855 commit 7fbfe71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/node/markdown/plugins/containers.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ function createContainer(
3838
container,
3939
klass,
4040
{
41-
render(tokens, idx) {
41+
render(tokens, idx, _options, env) {
4242
const token = tokens[idx]
4343
const info = token.info.trim().slice(klass.length).trim()
4444
const attrs = md.renderer.renderAttrs(token)
4545
if (token.nesting === 1) {
46-
const title = md.renderInline(info || defaultTitle)
46+
const title = md.renderInline(info || defaultTitle, { ...env })
4747
if (klass === 'details')
4848
return `<details class="${klass} custom-block"${attrs}><summary>${title}</summary>\n`
4949
return `<div class="${klass} custom-block"${attrs}><p class="custom-block-title">${title}</p>\n`

0 commit comments

Comments
 (0)
Please sign in to comment.