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- * [ ` fromMarkdown(value[, encoding][, options]) ` ] ( #frommarkdownvalue-encoding-options )
21- * [ ` CompileContext ` ] ( #compilecontext )
22- * [ ` CompileData ` ] ( #compiledata )
23- * [ ` Encoding ` ] ( #encoding )
24- * [ ` Extension ` ] ( #extension )
25- * [ ` Handle ` ] ( #handle )
26- * [ ` OnEnterError ` ] ( #onentererror )
27- * [ ` OnExitError ` ] ( #onexiterror )
28- * [ ` Options ` ] ( #options )
29- * [ ` Token ` ] ( #token )
30- * [ ` Transform ` ] ( #transform )
31- * [ ` Value ` ] ( #value )
32- * [ List of extensions] ( #list-of-extensions )
33- * [ Syntax] ( #syntax )
34- * [ Syntax tree] ( #syntax-tree )
35- * [ Types] ( #types )
36- * [ Compatibility] ( #compatibility )
37- * [ Security] ( #security )
38- * [ Related] ( #related )
39- * [ Contribute] ( #contribute )
40- * [ 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+ * [ ` fromMarkdown(value[, encoding][, options]) ` ] ( #frommarkdownvalue-encoding-options )
21+ * [ ` CompileContext ` ] ( #compilecontext )
22+ * [ ` CompileData ` ] ( #compiledata )
23+ * [ ` Encoding ` ] ( #encoding )
24+ * [ ` Extension ` ] ( #extension )
25+ * [ ` Handle ` ] ( #handle )
26+ * [ ` OnEnterError ` ] ( #onentererror )
27+ * [ ` OnExitError ` ] ( #onexiterror )
28+ * [ ` Options ` ] ( #options )
29+ * [ ` Token ` ] ( #token )
30+ * [ ` Transform ` ] ( #transform )
31+ * [ ` Value ` ] ( #value )
32+ * [ List of extensions] ( #list-of-extensions )
33+ * [ Syntax] ( #syntax )
34+ * [ Syntax tree] ( #syntax-tree )
35+ * [ Types] ( #types )
36+ * [ Compatibility] ( #compatibility )
37+ * [ Security] ( #security )
38+ * [ Related] ( #related )
39+ * [ Contribute] ( #contribute )
40+ * [ License] ( #license )
4141
4242## What is this?
4343
@@ -142,18 +142,18 @@ Turn markdown into a syntax tree.
142142
143143###### Overloads
144144
145- * ` (value: Value, encoding: Encoding, options?: Options) => Root `
146- * ` (value: Value, options?: Options) => Root `
145+ * ` (value: Value, encoding: Encoding, options?: Options) => Root `
146+ * ` (value: Value, options?: Options) => Root `
147147
148148###### Parameters
149149
150- * ` value ` ([ ` Value ` ] [ api-value ] )
151- — markdown to parse
152- * ` encoding ` ([ ` Encoding ` ] [ api-encoding ] , default: ` 'utf8' ` )
153- — [ character encoding] [ encoding ] for when ` value ` is
154- [ ` Uint8Array ` ] [ uint8-array ]
155- * ` options ` ([ ` Options ` ] [ api-options ] , optional)
156- — configuration
150+ * ` value ` ([ ` Value ` ] [ api-value ] )
151+ — markdown to parse
152+ * ` encoding ` ([ ` Encoding ` ] [ api-encoding ] , default: ` 'utf8' ` )
153+ — [ character encoding] [ encoding ] for when ` value ` is
154+ [ ` Uint8Array ` ] [ uint8-array ]
155+ * ` options ` ([ ` Options ` ] [ api-options ] , optional)
156+ — configuration
157157
158158###### Returns
159159
@@ -165,24 +165,24 @@ mdast compiler context (TypeScript type).
165165
166166###### Fields
167167
168- * ` stack ` ([ ` Array<Node> ` ] [ node ] )
169- — stack of nodes
170- * ` tokenStack ` (` Array<[Token, OnEnterError | undefined]> ` )
171- — stack of tokens
172- * ` data ` ([ ` CompileData ` ] [ api-compile-data ] )
173- — info passed around; key/value store
174- * ` buffer ` (` () => undefined ` )
175- — capture some of the output data
176- * ` resume ` (` () => string ` )
177- — stop capturing and access the output data
178- * ` enter ` (` (node: Node, token: Token, onError?: OnEnterError) => undefined ` )
179- — enter a node
180- * ` exit ` (` (token: Token, onError?: OnExitError) => undefined ` )
181- — exit a node
182- * ` sliceSerialize ` (` (token: Token, expandTabs?: boolean) => string ` )
183- — get the string value of a token
184- * ` config ` (` Required<Extension> ` )
185- — configuration
168+ * ` stack ` ([ ` Array<Node> ` ] [ node ] )
169+ — stack of nodes
170+ * ` tokenStack ` (` Array<[Token, OnEnterError | undefined]> ` )
171+ — stack of tokens
172+ * ` data ` ([ ` CompileData ` ] [ api-compile-data ] )
173+ — info passed around; key/value store
174+ * ` buffer ` (` () => undefined ` )
175+ — capture some of the output data
176+ * ` resume ` (` () => string ` )
177+ — stop capturing and access the output data
178+ * ` enter ` (` (node: Node, token: Token, onError?: OnEnterError) => undefined ` )
179+ — enter a node
180+ * ` exit ` (` (token: Token, onError?: OnExitError) => undefined ` )
181+ — exit a node
182+ * ` sliceSerialize ` (` (token: Token, expandTabs?: boolean) => string ` )
183+ — get the string value of a token
184+ * ` config ` (` Required<Extension> ` )
185+ — configuration
186186
187187### ` CompileData `
188188
@@ -225,25 +225,25 @@ type).
225225
226226###### Properties
227227
228- * ` canContainEols ` ( ` Array <string >` , optional)
229- — token types where line endings are used
230- * ` enter ` ([ ` Record <string , Handle >` ][api-handle], optional)
231- — opening handles
232- * ` exit ` ([ ` Record <string , Handle >` ][api-handle], optional)
233- — closing handles
234- * ` transforms ` ([ ` Array <Transform >` ][api-transform], optional)
235- — tree transforms
228+ * ` canContainEols ` ( ` Array <string >` , optional)
229+ — token types where line endings are used
230+ * ` enter ` ([ ` Record <string , Handle >` ][api-handle], optional)
231+ — opening handles
232+ * ` exit ` ([ ` Record <string , Handle >` ][api-handle], optional)
233+ — closing handles
234+ * ` transforms ` ([ ` Array <Transform >` ][api-transform], optional)
235+ — tree transforms
236236
237237### ` Handle `
238238
239239Handle a token (TypeScript type).
240240
241241###### Parameters
242242
243- * ` this ` ([ ` CompileContext ` ][api-compile-context])
244- — context
245- * ` token ` ([ ` Token ` ][api-token])
246- — current token
243+ * ` this ` ([ ` CompileContext ` ][api-compile-context])
244+ — context
245+ * ` token ` ([ ` Token ` ][api-token])
246+ — current token
247247
248248###### Returns
249249
@@ -256,12 +256,12 @@ Handle the case where the `right` token is open, but it is closed (by the
256256
257257###### Parameters
258258
259- * ` this ` ([ ` CompileContext ` ][api-compile-context])
260- — context
261- * ` left ` ([ ` Token ` ][api-token] or ` undefined ` )
262- — left token
263- * ` right ` ([ ` Token ` ][api-token])
264- — right token
259+ * ` this ` ([ ` CompileContext ` ][api-compile-context])
260+ — context
261+ * ` left ` ([ ` Token ` ][api-token] or ` undefined ` )
262+ — left token
263+ * ` right ` ([ ` Token ` ][api-token])
264+ — right token
265265
266266###### Returns
267267
@@ -274,12 +274,12 @@ exiting the `left` token (TypeScript type).
274274
275275###### Parameters
276276
277- * ` this ` ([ ` CompileContext ` ][api-compile-context])
278- — context
279- * ` left ` ([ ` Token ` ][api-token])
280- — left token
281- * ` right ` ([ ` Token ` ][api-token])
282- — right token
277+ * ` this ` ([ ` CompileContext ` ][api-compile-context])
278+ — context
279+ * ` left ` ([ ` Token ` ][api-token])
280+ — left token
281+ * ` right ` ([ ` Token ` ][api-token])
282+ — right token
283283
284284###### Returns
285285
@@ -291,11 +291,11 @@ Configuration (TypeScript type).
291291
292292###### Properties
293293
294- * ` extensions ` ([ ` Array <MicromarkExtension >` ][micromark-extension], optional)
295- — micromark extensions to change how markdown is parsed
296- * ` mdastExtensions ` ([ ` Array <Extension | Array <Extension >>` ][api-extension],
297- optional)
298- — extensions for this utility to change how tokens are turned into a tree
294+ * ` extensions ` ([ ` Array <MicromarkExtension >` ][micromark-extension], optional)
295+ — micromark extensions to change how markdown is parsed
296+ * ` mdastExtensions ` ([ ` Array <Extension | Array <Extension >>` ][api-extension],
297+ optional)
298+ — extensions for this utility to change how tokens are turned into a tree
299299
300300### ` Token `
301301
@@ -313,8 +313,8 @@ Extra transform, to change the AST afterwards (TypeScript type).
313313
314314###### Parameters
315315
316- * ` tree ` ([ ` Root ` ][root])
317- — tree to transform
316+ * ` tree ` ([ ` Root ` ][root])
317+ — tree to transform
318318
319319###### Returns
320320
@@ -334,32 +334,32 @@ type Value = Uint8Array | string
334334
335335## List of extensions
336336
337- * [ ` syntax -tree /mdast -util -directive ` ](https://github.com/syntax-tree/mdast-util-directive)
338- — directives
339- * [ ` syntax -tree /mdast -util -frontmatter ` ](https://github.com/syntax-tree/mdast-util-frontmatter)
340- — frontmatter (YAML, TOML, more)
341- * [ ` syntax -tree /mdast -util -gfm ` ](https://github.com/syntax-tree/mdast-util-gfm)
342- — GFM
343- * [ ` syntax -tree /mdast -util -gfm -autolink -literal ` ](https://github.com/syntax-tree/mdast-util-gfm-autolink-literal)
344- — GFM autolink literals
345- * [ ` syntax -tree /mdast -util -gfm -footnote ` ](https://github.com/syntax-tree/mdast-util-gfm-footnote)
346- — GFM footnotes
347- * [ ` syntax -tree /mdast -util -gfm -strikethrough ` ](https://github.com/syntax-tree/mdast-util-gfm-strikethrough)
348- — GFM strikethrough
349- * [ ` syntax -tree /mdast -util -gfm -table ` ](https://github.com/syntax-tree/mdast-util-gfm-table)
350- — GFM tables
351- * [ ` syntax -tree /mdast -util -gfm -task -list -item ` ](https://github.com/syntax-tree/mdast-util-gfm-task-list-item)
352- — GFM task list items
353- * [ ` syntax -tree /mdast -util -math ` ](https://github.com/syntax-tree/mdast-util-math)
354- — math
355- * [ ` syntax -tree /mdast -util -mdx ` ](https://github.com/syntax-tree/mdast-util-mdx)
356- — MDX
357- * [ ` syntax -tree /mdast -util -mdx -expression ` ](https://github.com/syntax-tree/mdast-util-mdx-expression)
358- — MDX expressions
359- * [ ` syntax -tree /mdast -util -mdx -jsx ` ](https://github.com/syntax-tree/mdast-util-mdx-jsx)
360- — MDX JSX
361- * [ ` syntax -tree /mdast -util -mdxjs -esm ` ](https://github.com/syntax-tree/mdast-util-mdxjs-esm)
362- — MDX ESM
337+ * [ ` syntax -tree /mdast -util -directive ` ](https://github.com/syntax-tree/mdast-util-directive)
338+ — directives
339+ * [ ` syntax -tree /mdast -util -frontmatter ` ](https://github.com/syntax-tree/mdast-util-frontmatter)
340+ — frontmatter (YAML, TOML, more)
341+ * [ ` syntax -tree /mdast -util -gfm ` ](https://github.com/syntax-tree/mdast-util-gfm)
342+ — GFM
343+ * [ ` syntax -tree /mdast -util -gfm -autolink -literal ` ](https://github.com/syntax-tree/mdast-util-gfm-autolink-literal)
344+ — GFM autolink literals
345+ * [ ` syntax -tree /mdast -util -gfm -footnote ` ](https://github.com/syntax-tree/mdast-util-gfm-footnote)
346+ — GFM footnotes
347+ * [ ` syntax -tree /mdast -util -gfm -strikethrough ` ](https://github.com/syntax-tree/mdast-util-gfm-strikethrough)
348+ — GFM strikethrough
349+ * [ ` syntax -tree /mdast -util -gfm -table ` ](https://github.com/syntax-tree/mdast-util-gfm-table)
350+ — GFM tables
351+ * [ ` syntax -tree /mdast -util -gfm -task -list -item ` ](https://github.com/syntax-tree/mdast-util-gfm-task-list-item)
352+ — GFM task list items
353+ * [ ` syntax -tree /mdast -util -math ` ](https://github.com/syntax-tree/mdast-util-math)
354+ — math
355+ * [ ` syntax -tree /mdast -util -mdx ` ](https://github.com/syntax-tree/mdast-util-mdx)
356+ — MDX
357+ * [ ` syntax -tree /mdast -util -mdx -expression ` ](https://github.com/syntax-tree/mdast-util-mdx-expression)
358+ — MDX expressions
359+ * [ ` syntax -tree /mdast -util -mdx -jsx ` ](https://github.com/syntax-tree/mdast-util-mdx-jsx)
360+ — MDX JSX
361+ * [ ` syntax -tree /mdast -util -mdxjs -esm ` ](https://github.com/syntax-tree/mdast-util-mdxjs-esm)
362+ — MDX ESM
363363
364364## Syntax
365365
@@ -407,12 +407,12 @@ When going to HTML, use this utility in combination with
407407
408408## Related
409409
410- * [ ` syntax -tree /mdast -util -to -markdown ` ](https://github.com/syntax-tree/mdast-util-to-markdown)
411- — serialize mdast as markdown
412- * [ ` micromark /micromark ` ](https://github.com/micromark/micromark)
413- — parse markdown
414- * [ ` remarkjs /remark ` ](https://github.com/remarkjs/remark)
415- — process markdown
410+ * [ ` syntax -tree /mdast -util -to -markdown ` ](https://github.com/syntax-tree/mdast-util-to-markdown)
411+ — serialize mdast as markdown
412+ * [ ` micromark /micromark ` ](https://github.com/micromark/micromark)
413+ — parse markdown
414+ * [ ` remarkjs /remark ` ](https://github.com/remarkjs/remark)
415+ — process markdown
416416
417417## Contribute
418418
0 commit comments