1212
1313## Contents
1414
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- * [ ` findAndReplace(tree, list[, options]) ` ] ( #findandreplacetree-list-options )
21- * [ ` Find ` ] ( #find )
22- * [ ` FindAndReplaceList ` ] ( #findandreplacelist )
23- * [ ` FindAndReplaceTuple ` ] ( #findandreplacetuple )
24- * [ ` Options ` ] ( #options )
25- * [ ` RegExpMatchObject ` ] ( #regexpmatchobject )
26- * [ ` Replace ` ] ( #replace )
27- * [ ` ReplaceFunction ` ] ( #replacefunction )
28- * [ Types] ( #types )
29- * [ Compatibility] ( #compatibility )
30- * [ Security] ( #security )
31- * [ Related] ( #related )
32- * [ Contribute] ( #contribute )
33- * [ 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+ * [ ` findAndReplace(tree, list[, options]) ` ] ( #findandreplacetree-list-options )
21+ * [ ` Find ` ] ( #find )
22+ * [ ` FindAndReplaceList ` ] ( #findandreplacelist )
23+ * [ ` FindAndReplaceTuple ` ] ( #findandreplacetuple )
24+ * [ ` Options ` ] ( #options )
25+ * [ ` RegExpMatchObject ` ] ( #regexpmatchobject )
26+ * [ ` Replace ` ] ( #replace )
27+ * [ ` ReplaceFunction ` ] ( #replacefunction )
28+ * [ Types] ( #types )
29+ * [ Compatibility] ( #compatibility )
30+ * [ Security] ( #security )
31+ * [ Related] ( #related )
32+ * [ Contribute] ( #contribute )
33+ * [ License] ( #license )
3434
3535## What is this?
3636
@@ -132,13 +132,13 @@ Partial matches are not supported.
132132
133133###### Parameters
134134
135- * ` tree ` ([ ` Node ` ] [ node ] )
136- — tree to change
137- * ` list ` ([ ` FindAndReplaceList ` ] [ api-find-and-replace-list ] or
138- [ ` FindAndReplaceTuple ` ] [ api-find-and-replace-tuple ] )
139- — one or more find-and-replace pairs
140- * ` options ` ([ ` Options ` ] [ api-options ] )
141- — configuration
135+ * ` tree ` ([ ` Node ` ] [ node ] )
136+ — tree to change
137+ * ` list ` ([ ` FindAndReplaceList ` ] [ api-find-and-replace-list ] or
138+ [ ` FindAndReplaceTuple ` ] [ api-find-and-replace-tuple ] )
139+ — one or more find-and-replace pairs
140+ * ` options ` ([ ` Options ` ] [ api-options ] )
141+ — configuration
142142
143143###### Returns
144144
@@ -186,21 +186,21 @@ Configuration (TypeScript type).
186186
187187###### Fields
188188
189- * ` ignore ` ([ ` Test ` ][test], optional)
190- — test for which elements to ignore
189+ * ` ignore ` ([ ` Test ` ][test], optional)
190+ — test for which elements to ignore
191191
192192### ` RegExpMatchObject `
193193
194194Info on the match (TypeScript type).
195195
196196###### Fields
197197
198- * ` index ` ( ` number ` )
199- — the index of the search at which the result was found
200- * ` input ` ( ` string ` )
201- — a copy of the search string in the text node
202- * ` stack ` ([ ` Array <Node >` ][node])
203- — all ancestors of the text node, where the last node is the text itself
198+ * ` index ` ( ` number ` )
199+ — the index of the search at which the result was found
200+ * ` input ` ( ` string ` )
201+ — a copy of the search string in the text node
202+ * ` stack ` ([ ` Array <Node >` ][node])
203+ — all ancestors of the text node, where the last node is the text itself
204204
205205### ` Replace `
206206
@@ -222,21 +222,21 @@ Callback called when a search matches (TypeScript type).
222222
223223The parameters are the result of corresponding search expression:
224224
225- * ` value ` ( ` string ` )
226- — whole match
227- * ` ...capture ` ( ` Array <string >` )
228- — matches from regex capture groups
229- * ` match ` ([ ` RegExpMatchObject ` ][api-regexp-match-object])
230- — info on the match
225+ * ` value ` ( ` string ` )
226+ — whole match
227+ * ` ...capture ` ( ` Array <string >` )
228+ — matches from regex capture groups
229+ * ` match ` ([ ` RegExpMatchObject ` ][api-regexp-match-object])
230+ — info on the match
231231
232232###### Returns
233233
234234Thing to replace with:
235235
236- * when ` null ` , ` undefined ` , ` ' ' ` , remove the match
237- * …or when ` false ` , do not replace at all
238- * …or when ` string ` , replace with a text node of that value
239- * …or when ` Node ` or ` Array <Node >` , replace with those nodes
236+ * when ` null ` , ` undefined ` , ` ' ' ` , remove the match
237+ * …or when ` false ` , do not replace at all
238+ * …or when ` string ` , replace with a text node of that value
239+ * …or when ` Node ` or ` Array <Node >` , replace with those nodes
240240
241241## Types
242242
@@ -266,12 +266,12 @@ so there are no openings for [cross-site scripting (XSS)][xss] attacks.
266266
267267## Related
268268
269- * [ ` hast -util -find -and -replace ` ](https://github.com/syntax-tree/hast-util-find-and-replace)
270- — find and replace in hast
271- * [ ` hast -util -select ` ](https://github.com/syntax-tree/hast-util-select)
272- — ` querySelector ` , ` querySelectorAll ` , and ` matches `
273- * [ ` unist -util -select ` ](https://github.com/syntax-tree/unist-util-select)
274- — select unist nodes with CSS-like selectors
269+ * [ ` hast -util -find -and -replace ` ](https://github.com/syntax-tree/hast-util-find-and-replace)
270+ — find and replace in hast
271+ * [ ` hast -util -select ` ](https://github.com/syntax-tree/hast-util-select)
272+ — ` querySelector ` , ` querySelectorAll ` , and ` matches `
273+ * [ ` unist -util -select ` ](https://github.com/syntax-tree/unist-util-select)
274+ — select unist nodes with CSS-like selectors
275275
276276## Contribute
277277
0 commit comments