fix(a11y): add title to copy code button (#1437)

Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
pull/1440/head
Joaquín Sánchez 2 years ago committed by GitHub
parent 88fb940fbf
commit f79bb78bf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -15,7 +15,7 @@ export const preWrapperPlugin = (md: MarkdownIt) => {
const [tokens, idx] = args
const lang = tokens[idx].info.trim().replace(/-vue$/, '')
const rawCode = fence(...args)
return `<div class="language-${lang}"><button class="copy"></button><span class="lang">${
return `<div class="language-${lang}"><button title="Copy Code" class="copy"></button><span class="lang">${
lang === 'vue-html' ? 'template' : lang
}</span>${rawCode}</div>`
}

Loading…
Cancel
Save