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- * [ ` toMdast(tree[, options]) ` ] ( #tomdasttree-options )
21- * [ ` defaultHandlers ` ] ( #defaulthandlers )
22- * [ ` defaultNodeHandlers ` ] ( #defaultnodehandlers )
23- * [ ` Handle ` ] ( #handle )
24- * [ ` NodeHandle ` ] ( #nodehandle )
25- * [ ` Options ` ] ( #options )
26- * [ ` State ` ] ( #state )
27- * [ Examples] ( #examples )
28- * [ Example: ignoring things] ( #example-ignoring-things )
29- * [ Example: keeping some HTML] ( #example-keeping-some-html )
30- * [ Algorithm] ( #algorithm )
31- * [ Syntax] ( #syntax )
32- * [ Syntax tree] ( #syntax-tree )
33- * [ Types] ( #types )
34- * [ Compatibility] ( #compatibility )
35- * [ Security] ( #security )
36- * [ Related] ( #related )
37- * [ Contribute] ( #contribute )
38- * [ 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+ * [ ` toMdast(tree[, options]) ` ] ( #tomdasttree-options )
21+ * [ ` defaultHandlers ` ] ( #defaulthandlers )
22+ * [ ` defaultNodeHandlers ` ] ( #defaultnodehandlers )
23+ * [ ` Handle ` ] ( #handle )
24+ * [ ` NodeHandle ` ] ( #nodehandle )
25+ * [ ` Options ` ] ( #options )
26+ * [ ` State ` ] ( #state )
27+ * [ Examples] ( #examples )
28+ * [ Example: ignoring things] ( #example-ignoring-things )
29+ * [ Example: keeping some HTML] ( #example-keeping-some-html )
30+ * [ Algorithm] ( #algorithm )
31+ * [ Syntax] ( #syntax )
32+ * [ Syntax tree] ( #syntax-tree )
33+ * [ Types] ( #types )
34+ * [ Compatibility] ( #compatibility )
35+ * [ Security] ( #security )
36+ * [ Related] ( #related )
37+ * [ Contribute] ( #contribute )
38+ * [ License] ( #license )
3939
4040## What is this?
4141
@@ -119,10 +119,10 @@ Transform hast to mdast.
119119
120120###### Parameters
121121
122- * ` tree ` ([ ` HastNode ` ] [ hast-node ] )
123- — hast tree to transform
124- * ` options ` ([ ` Options ` ] [ api-options ] , optional)
125- — configuration
122+ * ` tree ` ([ ` HastNode ` ] [ hast-node ] )
123+ — hast tree to transform
124+ * ` options ` ([ ` Options ` ] [ api-options ] , optional)
125+ — configuration
126126
127127###### Returns
128128
@@ -146,12 +146,12 @@ Handle a particular element (TypeScript type).
146146
147147###### Parameters
148148
149- * ` state ` ([ ` State ` ] [ api-state ] )
150- — info passed around about the current state
151- * ` element ` ([ ` Element ` ] [ element ] )
152- — element to transform
153- * ` parent ` ([ ` HastParent ` ] [ hast-parent ] )
154- — parent of ` element `
149+ * ` state ` ([ ` State ` ] [ api-state ] )
150+ — info passed around about the current state
151+ * ` element ` ([ ` Element ` ] [ element ] )
152+ — element to transform
153+ * ` parent ` ([ ` HastParent ` ] [ hast-parent ] )
154+ — parent of ` element `
155155
156156###### Returns
157157
@@ -163,12 +163,12 @@ Handle a particular node (TypeScript type).
163163
164164###### Parameters
165165
166- * ` state ` ([ ` State ` ] [ api-state ] )
167- — info passed around about the current state
168- * ` node ` (` any ` )
169- — node to transform
170- * ` parent ` ([ ` HastParent ` ] [ hast-parent ] )
171- — parent of ` node `
166+ * ` state ` ([ ` State ` ] [ api-state ] )
167+ — info passed around about the current state
168+ * ` node ` (` any ` )
169+ — node to transform
170+ * ` parent ` ([ ` HastParent ` ] [ hast-parent ] )
171+ — parent of ` node `
172172
173173###### Returns
174174
@@ -245,34 +245,34 @@ Info passed around about the current state (TypeScript type).
245245
246246###### Fields
247247
248- * ` patch ` (` (from: HastNode, to: MdastNode) => undefined ` )
249- — copy a node’s positional info
250- * ` one ` (` (node: HastNode, parent: HastParent | undefined) => Array<MdastNode> | MdastNode | undefined ` )
251- — transform a hast node to mdast
252- * ` all ` (` (parent: HastParent) => Array<MdastContent> ` )
253- — transform the children of a hast parent to mdast
254- * ` toFlow ` (` (nodes: Array<MdastContent>) => Array<MdastFlowContent> ` )
255- — transform a list of mdast nodes to flow
256- * ` toSpecificContent ` (` <ParentType>(nodes: Array<MdastContent>, build: (() => ParentType)) => Array<ParentType> ` )
257- — turn arbitrary content into a list of a particular node type
258- * ` resolve ` (` (url: string | null | undefined) => string ` )
259- — resolve a URL relative to a base
260- * ` options ` ([ ` Options ` ] [ api-options ] )
261- — user configuration
262- * ` elementById ` (` Map<string, Element> ` )
263- — elements by their ` id `
264- * ` handlers ` (` Record<string, Handle> ` )
265- — applied element handlers (see [ ` Handle ` ] [ api-handle ] )
266- * ` nodeHandlers ` (` Record<string, NodeHandle> ` )
267- — applied node handlers (see [ ` NodeHandle ` ] [ api-node-handle ] )
268- * ` baseFound ` (` boolean ` )
269- — whether a ` <base> ` element was seen
270- * ` frozenBaseUrl ` (` string | undefined ` )
271- — ` href ` of ` <base> ` , if any
272- * ` inTable ` (` boolean ` )
273- — whether we’re in a table
274- * ` qNesting ` (` number ` )
275- — how deep we’re in ` <q> ` s
248+ * ` patch ` (` (from: HastNode, to: MdastNode) => undefined ` )
249+ — copy a node’s positional info
250+ * ` one ` (` (node: HastNode, parent: HastParent | undefined) => Array<MdastNode> | MdastNode | undefined ` )
251+ — transform a hast node to mdast
252+ * ` all ` (` (parent: HastParent) => Array<MdastContent> ` )
253+ — transform the children of a hast parent to mdast
254+ * ` toFlow ` (` (nodes: Array<MdastContent>) => Array<MdastFlowContent> ` )
255+ — transform a list of mdast nodes to flow
256+ * ` toSpecificContent ` (` <ParentType>(nodes: Array<MdastContent>, build: (() => ParentType)) => Array<ParentType> ` )
257+ — turn arbitrary content into a list of a particular node type
258+ * ` resolve ` (` (url: string | null | undefined) => string ` )
259+ — resolve a URL relative to a base
260+ * ` options ` ([ ` Options ` ] [ api-options ] )
261+ — user configuration
262+ * ` elementById ` (` Map<string, Element> ` )
263+ — elements by their ` id `
264+ * ` handlers ` (` Record<string, Handle> ` )
265+ — applied element handlers (see [ ` Handle ` ] [ api-handle ] )
266+ * ` nodeHandlers ` (` Record<string, NodeHandle> ` )
267+ — applied node handlers (see [ ` NodeHandle ` ] [ api-node-handle ] )
268+ * ` baseFound ` (` boolean ` )
269+ — whether a ` <base> ` element was seen
270+ * ` frozenBaseUrl ` (` string | undefined ` )
271+ — ` href ` of ` <base> ` , if any
272+ * ` inTable ` (` boolean ` )
273+ — whether we’re in a table
274+ * ` qNesting ` (` number ` )
275+ — how deep we’re in ` <q> ` s
276276
277277## Examples
278278
@@ -431,10 +431,10 @@ Use of `hast-util-to-mdast` is safe by default.
431431
432432## Related
433433
434- * [ ` hast-util-to-nlcst ` ] ( https://github.com/syntax-tree/hast-util-to-nlcst )
435- — transform hast to nlcst
436- * [ ` hast-util-to-xast ` ] ( https://github.com/syntax-tree/hast-util-to-xast )
437- — transform hast to xast
434+ * [ ` hast-util-to-nlcst ` ] ( https://github.com/syntax-tree/hast-util-to-nlcst )
435+ — transform hast to nlcst
436+ * [ ` hast-util-to-xast ` ] ( https://github.com/syntax-tree/hast-util-to-xast )
437+ — transform hast to xast
438438
439439## Contribute
440440
0 commit comments