feat: add `data-title` attribute for code-group label

pull/4152/head
yuyinws 1 year ago
parent d062732859
commit 7ad457d664
No known key found for this signature in database
GPG Key ID: 066DDFA8B76EA147

@ -111,7 +111,7 @@ function createCodeGroup(options: Options): ContainerArgs {
if (title) {
const id = nanoid(7)
tabs += `<input type="radio" name="group-${name}" id="tab-${id}" ${checked}><label for="tab-${id}">${title}</label>`
tabs += `<input type="radio" name="group-${name}" id="tab-${id}" ${checked}><label data-title="${title}" for="tab-${id}">${title}</label>`
if (checked && !isHtml) tokens[i].info += ' active'
checked = ''

Loading…
Cancel
Save