()
| 11 | const theme = require('./themes/shades-of-purple.json'); |
| 12 | |
| 13 | export function rehypeParseCodeBlocks() { |
| 14 | return tree => { |
| 15 | visit(tree, 'element', (node, _nodeIndex, parentNode) => { |
| 16 | if (node.tagName === 'code' && node.properties.className) { |
| 17 | parentNode.properties.language = |
| 18 | node.properties.className[0]?.replace(/^language-/, ''); |
| 19 | } |
| 20 | }); |
| 21 | }; |
| 22 | } |
| 23 | |
| 24 | let highlighter; |
| 25 |
nothing calls this directly
no outgoing calls
no test coverage detected