File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
src/node/markdown/plugins Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -41,15 +41,13 @@ function createContainer(
4141 render ( tokens , idx ) {
4242 const token = tokens [ idx ]
4343 const info = token . info . trim ( ) . slice ( klass . length ) . trim ( )
44+ const attrs = md . renderer . renderAttrs ( token )
4445 if ( token . nesting === 1 ) {
4546 const title = md . renderInline ( info || defaultTitle )
46- if ( klass === 'details' ) {
47- return `<details class="${ klass } custom-block"><summary>${ title } </summary>\n`
48- }
49- return `<div class="${ klass } custom-block"><p class="custom-block-title">${ title } </p>\n`
50- } else {
51- return klass === 'details' ? `</details>\n` : `</div>\n`
52- }
47+ if ( klass === 'details' )
48+ return `<details class="${ klass } custom-block"${ attrs } ><summary>${ title } </summary>\n`
49+ return `<div class="${ klass } custom-block"${ attrs } ><p class="custom-block-title">${ title } </p>\n`
50+ } else return klass === 'details' ? `</details>\n` : `</div>\n`
5351 }
5452 }
5553 ]
You can’t perform that action at this time.
0 commit comments