File tree 1 file changed +5
-7
lines changed
src/node/markdown/plugins
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -41,15 +41,13 @@ function createContainer(
41
41
render ( tokens , idx ) {
42
42
const token = tokens [ idx ]
43
43
const info = token . info . trim ( ) . slice ( klass . length ) . trim ( )
44
+ const attrs = md . renderer . renderAttrs ( token )
44
45
if ( token . nesting === 1 ) {
45
46
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`
53
51
}
54
52
}
55
53
]
You can’t perform that action at this time.
0 commit comments