1
0
mirror of synced 2025-12-23 11:54:18 -05:00

Prior copy tag cleanup (#38387)

This commit is contained in:
Kevin Heis
2023-06-26 06:55:16 -07:00
committed by GitHub
parent 81da535aac
commit 14c24e20b8
2 changed files with 6 additions and 11 deletions

View File

@@ -14,13 +14,8 @@ export default function parseInfoString() {
visit(tree, matcher, (node) => {
node.meta = strToObj(node.meta)
// Temporary, change {:copy} to ` copy` to avoid conflict in styles.
// We may end up enabling copy on all code examples later.
const copyTag = '{:copy}'
if (node.lang.includes(copyTag)) {
node.meta.copy = true
node.lang = node.lang.replace(copyTag, '')
}
// Temporary, remove {:copy} to avoid highlight parse error in translations.
node.lang = node.lang.replace('{:copy}', '')
})
}
}