Skip to content

Commit 8b27f61

Browse files
committed
Refactor docs
1 parent 88969a4 commit 8b27f61

File tree

2 files changed

+24
-22
lines changed

2 files changed

+24
-22
lines changed

dev/lib/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@
135135
* Configuration.
136136
*/
137137

138-
// To do: micromark: create a registry of tokens?
139138
// To do: next major: don’t return given `Nodes` from `enter`.
140139
// To do: next major: remove setter/getter.
141140

readme.md

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Notable examples that deeply integrate with this package are
6868
## Install
6969

7070
This package is [ESM only][esm].
71-
In Node.js (version 14.14+ and 16.0+), install with [npm][]:
71+
In Node.js (version 16+), install with [npm][]:
7272

7373
```sh
7474
npm install mdast-util-from-markdown
@@ -129,7 +129,7 @@ console.log(tree)
129129

130130
## API
131131

132-
This package exports the identifier [`fromMarkdown`][api-frommarkdown].
132+
This package exports the identifier [`fromMarkdown`][api-from-markdown].
133133
There is no default export.
134134

135135
The export map supports the [`development` condition][development].
@@ -170,9 +170,9 @@ mdast compiler context (TypeScript type).
170170
* `tokenStack` (`Array<[Token, OnEnterError | undefined]>`)
171171
— stack of tokens
172172
* `getData` (`(key: string) => unknown`)
173-
— get data from the key/value store (see [`CompileData`][api-compiledata])
173+
— get data from the key/value store (see [`CompileData`][api-compile-data])
174174
* `setData` (`(key: string, value?: unknown) => undefined`)
175-
— set data into the key/value store (see [`CompileData`][api-compiledata])
175+
— set data into the key/value store (see [`CompileData`][api-compile-data])
176176
* `buffer` (`() => undefined`)
177177
— capture some of the output data
178178
* `resume` (`() => string`)
@@ -244,7 +244,7 @@ Handle a token (TypeScript type).
244244
245245
###### Parameters
246246
247-
* `this` ([`CompileContext`][api-compilecontext])
247+
* `this` ([`CompileContext`][api-compile-context])
248248
— context
249249
* `token` ([`Token`][api-token])
250250
— current token
@@ -260,7 +260,7 @@ Handle the case where the `right` token is open, but it is closed (by the
260260
261261
###### Parameters
262262
263-
* `this` ([`CompileContext`][api-compilecontext])
263+
* `this` ([`CompileContext`][api-compile-context])
264264
— context
265265
* `left` ([`Token`][api-token] or `undefined`)
266266
— left token
@@ -278,7 +278,7 @@ exiting the `left` token (TypeScript type).
278278
279279
###### Parameters
280280
281-
* `this` ([`CompileContext`][api-compilecontext])
281+
* `this` ([`CompileContext`][api-compile-context])
282282
— context
283283
* `left` ([`Token`][api-token])
284284
— left token
@@ -385,24 +385,27 @@ The syntax tree is [mdast][].
385385
## Types
386386
387387
This package is fully typed with [TypeScript][].
388-
It exports the additional types [`CompileContext`][api-compilecontext],
389-
[`CompileData`][api-compiledata],
388+
It exports the additional types [`CompileContext`][api-compile-context],
389+
[`CompileData`][api-compile-data],
390390
[`Encoding`][api-encoding],
391391
[`Extension`][api-extension],
392392
[`Handle`][api-handle],
393-
[`OnEnterError`][api-onentererror],
394-
[`OnExitError`][api-onexiterror],
393+
[`OnEnterError`][api-on-enter-error],
394+
[`OnExitError`][api-on-exit-error],
395395
[`Options`][api-options],
396396
[`Token`][api-token],
397397
[`Transform`][api-transform], and
398398
[`Value`][api-value].
399399
400400
## Compatibility
401401
402-
Projects maintained by the unified collective are compatible with all maintained
402+
Projects maintained by the unified collective are compatible with maintained
403403
versions of Node.js.
404-
As of now, that is Node.js 14.14+ and 16.0+.
405-
Our projects sometimes work with older versions, but this is not guaranteed.
404+
405+
When we cut a new major release, we drop support for unmaintained versions of
406+
Node.
407+
This means we try to keep the current release line,
408+
`mdast-util-from-markdown@^1`, compatible with Node.js 12.
406409
407410
## Security
408411
@@ -449,9 +452,9 @@ abide by its terms.
449452
450453
[downloads]: https://www.npmjs.com/package/mdast-util-from-markdown
451454
452-
[size-badge]: https://img.shields.io/bundlephobia/minzip/mdast-util-from-markdown.svg
455+
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=mdast-util-from-markdown
453456
454-
[size]: https://bundlephobia.com/result?p=mdast-util-from-markdown
457+
[size]: https://bundlejs.com/?q=mdast-util-from-markdown
455458
456459
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
457460
@@ -519,21 +522,21 @@ abide by its terms.
519522
520523
[development]: https://nodejs.org/api/packages.html#packages_resolving_user_conditions
521524
522-
[api-frommarkdown]: #frommarkdownvalue-encoding-options
525+
[api-from-markdown]: #frommarkdownvalue-encoding-options
523526
524-
[api-compilecontext]: #compilecontext
527+
[api-compile-context]: #compilecontext
525528
526-
[api-compiledata]: #compiledata
529+
[api-compile-data]: #compiledata
527530
528531
[api-encoding]: #encoding
529532
530533
[api-extension]: #extension
531534
532535
[api-handle]: #handle
533536
534-
[api-onentererror]: #onentererror
537+
[api-on-enter-error]: #onentererror
535538
536-
[api-onexiterror]: #onexiterror
539+
[api-on-exit-error]: #onexiterror
537540
538541
[api-options]: #options
539542

0 commit comments

Comments
 (0)