File tree 1 file changed +3
-3
lines changed
src/node/markdown/plugins
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export const containerPlugin = (
48
48
render : ( tokens : Token [ ] , idx : number ) =>
49
49
tokens [ idx ] . nesting === 1 ? `<div class="vp-raw">\n` : `</div>\n`
50
50
} )
51
- . use ( ...createCodeGroup ( options ) )
51
+ . use ( ...createCodeGroup ( options , md ) )
52
52
}
53
53
54
54
type ContainerArgs = [ typeof container , string , { render : RenderRule } ]
@@ -79,7 +79,7 @@ function createContainer(
79
79
]
80
80
}
81
81
82
- function createCodeGroup ( options : Options ) : ContainerArgs {
82
+ function createCodeGroup ( options : Options , md : MarkdownIt ) : ContainerArgs {
83
83
return [
84
84
container ,
85
85
'code-group' ,
@@ -111,7 +111,7 @@ function createCodeGroup(options: Options): ContainerArgs {
111
111
112
112
if ( title ) {
113
113
const id = nanoid ( 7 )
114
- tabs += `<input type="radio" name="group-${ name } " id="tab-${ id } " ${ checked } ><label for="tab-${ id } ">${ title } </label>`
114
+ tabs += `<input type="radio" name="group-${ name } " id="tab-${ id } " ${ checked } ><label data-title=" ${ md . utils . escapeHtml ( title ) } " for="tab-${ id } ">${ title } </label>`
115
115
116
116
if ( checked && ! isHtml ) tokens [ i ] . info += ' active'
117
117
checked = ''
You can’t perform that action at this time.
0 commit comments