Skip to content

Commit 8c8d4c7

Browse files
committed
Refactor docs
1 parent 3fa4b6b commit 8c8d4c7

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed

readme.md

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ That’s done by [`mdast-util-to-hast`][mdast-util-to-hast].
7676
## Install
7777

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

8181
```sh
8282
npm install mdast-util-gfm-autolink-literal
@@ -108,15 +108,18 @@ www.example.com, https://example.com, and contact@example.com.
108108

109109
```js
110110
import fs from 'node:fs/promises'
111+
import {gfmAutolinkLiteral} from 'micromark-extension-gfm-autolink-literal'
111112
import {fromMarkdown} from 'mdast-util-from-markdown'
113+
import {
114+
gfmAutolinkLiteralFromMarkdown,
115+
gfmAutolinkLiteralToMarkdown
116+
} from 'mdast-util-gfm-autolink-literal'
112117
import {toMarkdown} from 'mdast-util-to-markdown'
113-
import {gfmAutolinkLiteral} from 'micromark-extension-gfm-autolink-literal'
114-
import {gfmAutolinkLiteralFromMarkdown, gfmAutolinkLiteralToMarkdown} from 'mdast-util-gfm-autolink-literal'
115118

116119
const doc = await fs.readFile('example.md')
117120

118121
const tree = fromMarkdown(doc, {
119-
extensions: [gfmAutolinkLiteral],
122+
extensions: [gfmAutolinkLiteral()],
120123
mdastExtensions: [gfmAutolinkLiteralFromMarkdown]
121124
})
122125

@@ -170,19 +173,19 @@ console.log(out)
170173
## API
171174

172175
This package exports the identifiers
173-
[`gfmAutolinkLiteralFromMarkdown`][api-gfmautolinkliteralfrommarkdown] and
174-
[`gfmAutolinkLiteralToMarkdown`][api-gfmautolinkliteraltomarkdown].
176+
[`gfmAutolinkLiteralFromMarkdown`][api-gfm-autolink-literal-from-markdown] and
177+
[`gfmAutolinkLiteralToMarkdown`][api-gfm-autolink-literal-to-markdown].
175178
There is no default export.
176179

177180
### `gfmAutolinkLiteralFromMarkdown`
178181

179182
Extension for [`mdast-util-from-markdown`][mdast-util-from-markdown] to enable
180-
GFM autolink literals ([`FromMarkdownExtension`][frommarkdownextension]).
183+
GFM autolink literals ([`FromMarkdownExtension`][from-markdown-extension]).
181184

182185
### `gfmAutolinkLiteralToMarkdown`
183186

184187
Extension for [`mdast-util-to-markdown`][mdast-util-to-markdown] to enable
185-
GFM autolink literals ([`ToMarkdownExtension`][tomarkdownextension]).
188+
GFM autolink literals ([`ToMarkdownExtension`][to-markdown-extension]).
186189

187190
## HTML
188191

@@ -207,10 +210,13 @@ The `Link` type of the mdast nodes is exposed from `@types/mdast`.
207210

208211
## Compatibility
209212

210-
Projects maintained by the unified collective are compatible with all maintained
213+
Projects maintained by the unified collective are compatible with maintained
211214
versions of Node.js.
212-
As of now, that is Node.js 14.14+ and 16.0+.
213-
Our projects sometimes work with older versions, but this is not guaranteed.
215+
216+
When we cut a new major release, we drop support for unmaintained versions of
217+
Node.
218+
This means we try to keep the current release line,
219+
`mdast-util-gfm-autolink-literal@^1`, compatible with Node.js 12.
214220

215221
This plugin works with `mdast-util-from-markdown` version 1+ and
216222
`mdast-util-to-markdown` version 1+.
@@ -253,9 +259,9 @@ abide by its terms.
253259

254260
[downloads]: https://www.npmjs.com/package/mdast-util-gfm-autolink-literal
255261

256-
[size-badge]: https://img.shields.io/bundlephobia/minzip/mdast-util-gfm-autolink-literal.svg
262+
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=mdast-util-gfm-autolink-literal
257263

258-
[size]: https://bundlephobia.com/result?p=mdast-util-gfm-autolink-literal
264+
[size]: https://bundlejs.com/?q=mdast-util-gfm-autolink-literal
259265

260266
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
261267

@@ -309,10 +315,10 @@ abide by its terms.
309315

310316
[dfn-link]: https://github.com/syntax-tree/mdast#link
311317

312-
[frommarkdownextension]: https://github.com/syntax-tree/mdast-util-from-markdown#extension
318+
[from-markdown-extension]: https://github.com/syntax-tree/mdast-util-from-markdown#extension
313319

314-
[tomarkdownextension]: https://github.com/syntax-tree/mdast-util-to-markdown#options
320+
[to-markdown-extension]: https://github.com/syntax-tree/mdast-util-to-markdown#options
315321

316-
[api-gfmautolinkliteralfrommarkdown]: #gfmautolinkliteralfrommarkdown
322+
[api-gfm-autolink-literal-from-markdown]: #gfmautolinkliteralfrommarkdown
317323

318-
[api-gfmautolinkliteraltomarkdown]: #gfmautolinkliteraltomarkdown
324+
[api-gfm-autolink-literal-to-markdown]: #gfmautolinkliteraltomarkdown

0 commit comments

Comments
 (0)