(tree)
| 12 | const processor = retext().use(smartypants, options) |
| 13 | |
| 14 | function transformer(tree) { |
| 15 | visit(tree, 'text', (node, index, parent) => { |
| 16 | if (check(parent)) node.value = String(processor.processSync(node.value)) |
| 17 | }) |
| 18 | } |
| 19 | |
| 20 | return transformer |
| 21 | } |