@@ -74,7 +74,7 @@ turning mdast (markdown) nodes into hast (HTML) nodes,
7474## Install
7575
7676This package is [ ESM only] [ esm ] .
77- In Node.js (version 14.14+ and 16.0 +), install with [ npm] [ ] :
77+ In Node.js (version 16 +), install with [ npm] [ ] :
7878
7979``` sh
8080npm install mdast-util-math
110110
111111``` js
112112import fs from ' node:fs/promises'
113- import {fromMarkdown } from ' mdast-util-from-markdown'
114- import {toMarkdown } from ' mdast-util-to-markdown'
115113import {math } from ' micromark-extension-math'
114+ import {fromMarkdown } from ' mdast-util-from-markdown'
116115import {mathFromMarkdown , mathToMarkdown } from ' mdast-util-math'
116+ import {toMarkdown } from ' mdast-util-to-markdown'
117117
118118const doc = await fs .readFile (' example.md' )
119119
161161
162162## API
163163
164- This package exports the identifiers [ ` mathFromMarkdown ` ] [ api-mathfrommarkdown ]
165- and [ ` mathToMarkdown ` ] [ api-mathtomarkdown ] .
164+ This package exports the identifiers
165+ [ ` mathFromMarkdown ` ] [ api-math-from-markdown ]
166+ and [ ` mathToMarkdown ` ] [ api-math-to-markdown ] .
166167There is no default export.
167168
168169### ` mathFromMarkdown() `
@@ -172,21 +173,21 @@ Create an extension for [`mdast-util-from-markdown`][mdast-util-from-markdown].
172173###### Returns
173174
174175Extension for ` mdast-util-from-markdown `
175- ([ ` FromMarkdownExtension ` ] [ frommarkdownextension ] ).
176+ ([ ` FromMarkdownExtension ` ] [ from-markdown-extension ] ).
176177
177178### ` mathToMarkdown(options?) `
178179
179180Create an extension for [ ` mdast-util-to-markdown ` ] [ mdast-util-to-markdown ] .
180181
181182###### Parameters
182183
183- * ` options ` ([ ` ToOptions ` ] [ api-tooptions ] , optional)
184+ * ` options ` ([ ` ToOptions ` ] [ api-to-options ] , optional)
184185 — configuration
185186
186187###### Returns
187188
188189Extension for ` mdast-util-to-markdown `
189- ([ ` ToMarkdownExtension ` ] [ tomarkdownextension ] ).
190+ ([ ` ToMarkdownExtension ` ] [ to-markdown-extension ] ).
190191
191192### ` InlineMath `
192193
@@ -250,7 +251,7 @@ The following interfaces are added to **[mdast][]** by this utility.
250251
251252``` idl
252253interface Math <: Literal {
253- type: " code"
254+ type: ' code'
254255 meta: string?
255256}
256257```
@@ -290,7 +291,7 @@ Yields:
290291
291292``` idl
292293interface InlineMath <: Literal {
293- type: " inlineMath"
294+ type: ' inlineMath'
294295}
295296```
296297
@@ -327,14 +328,14 @@ type FlowContentMath = Math | FlowContent
327328#### ` PhrasingContent ` (math)
328329
329330``` idl
330- type PhrasingMath = InlineMath | PhrasingContent
331+ type PhrasingContentMath = InlineMath | PhrasingContent
331332```
332333
333334## Types
334335
335336This package is fully typed with [ TypeScript] [ ] .
336- It exports the additional types [ ` InlineMath ` ] [ api-inlinemath ] ,
337- [ ` Math ` ] [ api-math ] , and [ ` ToOptions ` ] [ api-tooptions ] .
337+ It exports the additional types [ ` InlineMath ` ] [ api-inline-math ] ,
338+ [ ` Math ` ] [ api-math ] , and [ ` ToOptions ` ] [ api-to-options ] .
338339
339340It also registers the node types with ` @types/mdast ` .
340341If you’re working with the syntax tree, make sure to import this utility
@@ -357,10 +358,13 @@ visit(tree, function (node) {
357358
358359## Compatibility
359360
360- Projects maintained by the unified collective are compatible with all maintained
361+ Projects maintained by the unified collective are compatible with maintained
361362versions of Node.js.
362- As of now, that is Node.js 14.14+ and 16.0+.
363- Our projects sometimes work with older versions, but this is not guaranteed.
363+
364+ When we cut a new major release, we drop support for unmaintained versions of
365+ Node.
366+ This means we try to keep the current release line, ` mdast-util-math@^2 ` ,
367+ compatible with Node.js 12.
364368
365369This plugin works with ` mdast-util-from-markdown ` version 1+ and
366370` mdast-util-to-markdown ` version 1+.
@@ -400,9 +404,9 @@ abide by its terms.
400404
401405[ downloads ] : https://www.npmjs.com/package/mdast-util-math
402406
403- [ size-badge ] : https://img.shields.io/bundlephobia/minzip/ mdast-util-math.svg
407+ [ size-badge ] : https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q= mdast-util-math
404408
405- [ size ] : https://bundlephobia .com/result?p =mdast-util-math
409+ [ size ] : https://bundlejs .com/?q =mdast-util-math
406410
407411[ sponsors-badge ] : https://opencollective.com/unified/sponsors/badge.svg
408412
@@ -454,19 +458,19 @@ abide by its terms.
454458
455459[ dfn-literal ] : https://github.com/syntax-tree/mdast#literal
456460
457- [ frommarkdownextension ] : https://github.com/syntax-tree/mdast-util-from-markdown#extension
461+ [ from-markdown-extension ] : https://github.com/syntax-tree/mdast-util-from-markdown#extension
458462
459- [ tomarkdownextension ] : https://github.com/syntax-tree/mdast-util-to-markdown#options
463+ [ to-markdown-extension ] : https://github.com/syntax-tree/mdast-util-to-markdown#options
460464
461- [ api-mathfrommarkdown ] : #mathfrommarkdown
465+ [ api-math-from-markdown ] : #mathfrommarkdown
462466
463- [ api-mathtomarkdown ] : #mathtomarkdownoptions
467+ [ api-math-to-markdown ] : #mathtomarkdownoptions
464468
465469[ api-math ] : #math
466470
467- [ api-inlinemath ] : #inlinemath
471+ [ api-inline-math ] : #inlinemath
468472
469- [ api-tooptions ] : #tooptions
473+ [ api-to-options ] : #tooptions
470474
471475[ dfn-flow-content ] : #flowcontent-math
472476
0 commit comments