Prior copy tag cleanup (#38387)
This commit is contained in:
@@ -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}', '')
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user