Skip to content
Permalink
Browse files
fix(a11y): add title to copy code button (#1437)
Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
  • Loading branch information
userquin and brc-dd committed Oct 5, 2022
1 parent 88fb940 commit f79bb78bf7f472d9bc376a3ec393f731bfe9e7ce
Showing 1 changed file with 1 addition and 1 deletion.
@@ -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>`
}

0 comments on commit f79bb78

Please sign in to comment.