|
12 | 12 |
|
13 | 13 | ## Contents |
14 | 14 |
|
15 | | -* [What is this?](#what-is-this) |
16 | | -* [When should I use this?](#when-should-i-use-this) |
17 | | -* [Install](#install) |
18 | | -* [Use](#use) |
19 | | -* [API](#api) |
20 | | - * [`visitParents(tree[, test], visitor[, reverse])`](#visitparentstree-test-visitor-reverse) |
21 | | - * [`CONTINUE`](#continue) |
22 | | - * [`EXIT`](#exit) |
23 | | - * [`SKIP`](#skip) |
24 | | - * [`Action`](#action) |
25 | | - * [`ActionTuple`](#actiontuple) |
26 | | - * [`BuildVisitor`](#buildvisitor) |
27 | | - * [`Index`](#index) |
28 | | - * [`Test`](#test) |
29 | | - * [`Visitor`](#visitor) |
30 | | - * [`VisitorResult`](#visitorresult) |
31 | | -* [Types](#types) |
32 | | -* [Compatibility](#compatibility) |
33 | | -* [Related](#related) |
34 | | -* [Contribute](#contribute) |
35 | | -* [License](#license) |
| 15 | +* [What is this?](#what-is-this) |
| 16 | +* [When should I use this?](#when-should-i-use-this) |
| 17 | +* [Install](#install) |
| 18 | +* [Use](#use) |
| 19 | +* [API](#api) |
| 20 | + * [`visitParents(tree[, test], visitor[, reverse])`](#visitparentstree-test-visitor-reverse) |
| 21 | + * [`CONTINUE`](#continue) |
| 22 | + * [`EXIT`](#exit) |
| 23 | + * [`SKIP`](#skip) |
| 24 | + * [`Action`](#action) |
| 25 | + * [`ActionTuple`](#actiontuple) |
| 26 | + * [`BuildVisitor`](#buildvisitor) |
| 27 | + * [`Index`](#index) |
| 28 | + * [`Test`](#test) |
| 29 | + * [`Visitor`](#visitor) |
| 30 | + * [`VisitorResult`](#visitorresult) |
| 31 | +* [Types](#types) |
| 32 | +* [Compatibility](#compatibility) |
| 33 | +* [Related](#related) |
| 34 | +* [Contribute](#contribute) |
| 35 | +* [License](#license) |
36 | 36 |
|
37 | 37 | ## What is this? |
38 | 38 |
|
@@ -117,14 +117,14 @@ See [`Visitor`][api-visitor] for more info. |
117 | 117 |
|
118 | 118 | ###### Parameters |
119 | 119 |
|
120 | | -* `tree` ([`Node`][node]) |
121 | | - — tree to traverse |
122 | | -* `test` ([`Test`][api-test], optional) |
123 | | - — [`unist-util-is`][unist-util-is]-compatible test |
124 | | -* `visitor` ([`Visitor`][api-visitor]) |
125 | | - — handle each node |
126 | | -* `reverse` (`boolean`, default: `false`) |
127 | | - — traverse in reverse preorder (NRL) instead of the default preorder (NLR) |
| 120 | +* `tree` ([`Node`][node]) |
| 121 | + — tree to traverse |
| 122 | +* `test` ([`Test`][api-test], optional) |
| 123 | + — [`unist-util-is`][unist-util-is]-compatible test |
| 124 | +* `visitor` ([`Visitor`][api-visitor]) |
| 125 | + — handle each node |
| 126 | +* `reverse` (`boolean`, default: `false`) |
| 127 | + — traverse in reverse preorder (NRL) instead of the default preorder (NLR) |
128 | 128 |
|
129 | 129 | ###### Returns |
130 | 130 |
|
@@ -174,10 +174,10 @@ It will infer which values are passed as `node` and which as `parents`. |
174 | 174 |
|
175 | 175 | ###### Type parameters |
176 | 176 |
|
177 | | -* `Tree` ([`Node`][node], default: `Node`) |
178 | | - — tree type |
179 | | -* `Check` ([`Test`][api-test], default: `Test`) |
180 | | - — test type |
| 177 | +* `Tree` ([`Node`][node], default: `Node`) |
| 178 | + — tree type |
| 179 | +* `Check` ([`Test`][api-test], default: `Test`) |
| 180 | + — test type |
181 | 181 |
|
182 | 182 | ###### Returns |
183 | 183 |
|
@@ -224,10 +224,10 @@ traversed. |
224 | 224 |
|
225 | 225 | ###### Parameters |
226 | 226 |
|
227 | | -* `node` ([`Node`][node]) |
228 | | - — found node |
229 | | -* `parents` ([`Array<Node>`][node]) |
230 | | - — ancestors of `node` |
| 227 | +* `node` ([`Node`][node]) |
| 228 | + — found node |
| 229 | +* `parents` ([`Array<Node>`][node]) |
| 230 | + — ancestors of `node` |
231 | 231 |
|
232 | 232 | ###### Returns |
233 | 233 |
|
@@ -276,18 +276,18 @@ This means we try to keep the current release line, |
276 | 276 |
|
277 | 277 | ## Related |
278 | 278 |
|
279 | | -* [`unist-util-visit`](https://github.com/syntax-tree/unist-util-visit) |
280 | | - — walk the tree with one parent |
281 | | -* [`unist-util-filter`](https://github.com/syntax-tree/unist-util-filter) |
282 | | - — create a new tree with all nodes that pass a test |
283 | | -* [`unist-util-map`](https://github.com/syntax-tree/unist-util-map) |
284 | | - — create a new tree with all nodes mapped by a given function |
285 | | -* [`unist-util-flatmap`](https://gitlab.com/staltz/unist-util-flatmap) |
286 | | - — create a new tree by mapping (to an array) with the given function |
287 | | -* [`unist-util-remove`](https://github.com/syntax-tree/unist-util-remove) |
288 | | - — remove nodes from a tree that pass a test |
289 | | -* [`unist-util-select`](https://github.com/syntax-tree/unist-util-select) |
290 | | - — select nodes with CSS-like selectors |
| 279 | +* [`unist-util-visit`](https://github.com/syntax-tree/unist-util-visit) |
| 280 | + — walk the tree with one parent |
| 281 | +* [`unist-util-filter`](https://github.com/syntax-tree/unist-util-filter) |
| 282 | + — create a new tree with all nodes that pass a test |
| 283 | +* [`unist-util-map`](https://github.com/syntax-tree/unist-util-map) |
| 284 | + — create a new tree with all nodes mapped by a given function |
| 285 | +* [`unist-util-flatmap`](https://gitlab.com/staltz/unist-util-flatmap) |
| 286 | + — create a new tree by mapping (to an array) with the given function |
| 287 | +* [`unist-util-remove`](https://github.com/syntax-tree/unist-util-remove) |
| 288 | + — remove nodes from a tree that pass a test |
| 289 | +* [`unist-util-select`](https://github.com/syntax-tree/unist-util-select) |
| 290 | + — select nodes with CSS-like selectors |
291 | 291 |
|
292 | 292 | ## Contribute |
293 | 293 |
|
|
0 commit comments