()
| 18 | } |
| 19 | |
| 20 | function rehypeSlugify() { |
| 21 | return (tree) => { |
| 22 | let slugify = slugifyWithCounter() |
| 23 | visit(tree, 'element', (node) => { |
| 24 | if (node.tagName === 'h2' && !node.properties.id) { |
| 25 | node.properties.id = slugify(toString(node)) |
| 26 | } |
| 27 | }) |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | function rehypeAddMDXExports(getExports) { |
| 32 | return (tree) => { |
nothing calls this directly
no outgoing calls
no test coverage detected