( pattern: RegExp, buildNode: NodeBuilder, )
| 20 | * nodes, and replaces each match with a node produced by `buildNode`. |
| 21 | */ |
| 22 | export function createRemarkPrefixPlugin( |
| 23 | pattern: RegExp, |
| 24 | buildNode: NodeBuilder, |
| 25 | ) { |
| 26 | return ( |
| 27 | // biome-ignore lint/suspicious/noExplicitAny: remark tree types are not available |
| 28 | tree: any, |
| 29 | ) => { |
| 30 | walkChildren(tree, pattern, buildNode); |
| 31 | }; |
| 32 | } |
| 33 | |
| 34 | // biome-ignore lint/suspicious/noExplicitAny: remark tree types are not available |
| 35 | function walkChildren(node: any, pattern: RegExp, buildNode: NodeBuilder) { |
no test coverage detected