File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/node/markdown/plugins Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -62,15 +62,16 @@ function createContainer(
6262 {
6363 render ( tokens , idx , _options , env : MarkdownEnv & { references ?: any } ) {
6464 const token = tokens [ idx ]
65- const info = token . info . trim ( ) . slice ( klass . length ) . trim ( )
66- const attrs = md . renderer . renderAttrs ( token )
6765 if ( token . nesting === 1 ) {
66+ token . attrJoin ( 'class' , `${ klass } custom-block` )
67+ const attrs = md . renderer . renderAttrs ( token )
68+ const info = token . info . trim ( ) . slice ( klass . length ) . trim ( )
6869 const title = md . renderInline ( info || defaultTitle , {
6970 references : env . references
7071 } )
7172 if ( klass === 'details' )
72- return `<details class=" ${ klass } custom-block" ${ attrs } ><summary>${ title } </summary>\n`
73- return `<div class=" ${ klass } custom-block" ${ attrs } ><p class="custom-block-title">${ title } </p>\n`
73+ return `<details ${ attrs } ><summary>${ title } </summary>\n`
74+ return `<div ${ attrs } ><p class="custom-block-title">${ title } </p>\n`
7475 } else return klass === 'details' ? `</details>\n` : `</div>\n`
7576 }
7677 }
You can’t perform that action at this time.
0 commit comments