1
0
mirror of synced 2025-12-21 10:57:10 -05:00

Change the copy code button to the copy octicon (#22769)

Co-authored-by: Peter Bengtsson <peterbe@github.com>
This commit is contained in:
Lucas Costi
2021-11-15 12:33:59 +10:00
committed by GitHub
parent 369a7cb765
commit 10ff422248

View File

@@ -93,7 +93,7 @@ export default function addCodeHeader(node) {
// Display the language using the above map of `{ [shortCode]: language }` // Display the language using the above map of `{ [shortCode]: language }`
const language = LANGUAGE_MAP[node.lang] || node.lang || 'Code' const language = LANGUAGE_MAP[node.lang] || node.lang || 'Code'
const btnIconHtml = octicons.paste.toSVG() const btnIconHtml = octicons.copy.toSVG()
const btnIconAst = parse5.parse(String(btnIconHtml), { sourceCodeLocationInfo: true }) const btnIconAst = parse5.parse(String(btnIconHtml), { sourceCodeLocationInfo: true })
const btnIcon = fromParse5(btnIconAst, { file: btnIconHtml }) const btnIcon = fromParse5(btnIconAst, { file: btnIconHtml })