Skip to content

TagSpaces is an offline, open source, document manager with tagging support

v5.4.0

Ilian Sapundshievd96634db647e
diff --git a/app/package.json b/app/package.json
index 569f5cbbf..a66134c09 100644
--- a/app/package.json
+++ b/app/package.json
@@ -1,7 +1,7 @@
{
"name": "tagspaces",
"productName": "TagSpaces",
- "version": "5.3.6",
+ "version": "5.4.0",
"description": "Offline file organizer and browser with tagging support.",
"homepage": "https://www.tagspaces.org",
"main": "./main.prod.js",
diff --git a/app/third-party.txt b/app/third-party.txt
index 2e0d3b6be..f2c2673b9 100644
--- a/app/third-party.txt
+++ b/app/third-party.txt
@@ -1116,7 +1116,7 @@ The following NPM packages may be included in this product:
- @aws-sdk/[email protected]
- @aws-sdk/[email protected]
- @aws-sdk/[email protected]
- - @aws-sdk/[email protected]
+ - @aws-sdk/[email protected]
- @aws-sdk/[email protected]
- @aws-sdk/[email protected]
- @aws-sdk/[email protected]
@@ -2685,63 +2685,57 @@ Apache License
The following NPM packages may be included in this product:
- - @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.18.6
+ - @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.5
+ - @babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2
@@ -2750,54 +2744,71 @@ The following NPM packages may be included in this product:
These packages each contain the following license and notice below:
@@ -2828,10 +2839,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The following NPM packages may be included in this product:
These packages each contain the following license and notice below:
@@ -2862,7 +2873,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -3015,13 +3026,14 @@ The following NPM packages may be included in this product:
- @codemirror/[email protected]
- @codemirror/[email protected]
- @codemirror/[email protected]
- - @codemirror/[email protected]
- - @codemirror/[email protected]
+ - @codemirror/[email protected]
+ - @codemirror/[email protected]
- @codemirror/[email protected]
- - @codemirror/[email protected]
- - @codemirror/[email protected]
- - @codemirror/[email protected]
- - @codemirror/[email protected]
+ - @codemirror/[email protected]
+ - @codemirror/[email protected]
+ - @codemirror/[email protected]
+ - @codemirror/[email protected]
+ - @codemirror/[email protected]
These packages each contain the following license and notice below:
@@ -3049,36 +3061,6 @@ THE SOFTWARE.
-----------
-The following NPM package may be included in this product:
-
- - @codemirror/[email protected]
-
-This package contains the following license and notice below:
-
-MIT License
-
-Copyright (C) 2018-2021 by Marijn Haverbeke <[email protected]> and others
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
------------
-
The following NPM packages may be included in this product:
- @date-io/[email protected]
@@ -5722,7 +5704,7 @@ The following NPM packages may be included in this product:
These packages each contain the following license and notice below:
@@ -5918,43 +5900,14 @@ SOFTWARE.
-----------
-The following NPM package may be included in this product:
-
-
-This package contains the following license and notice below:
-
-MIT License
-
-Copyright (C) 2018 by Marijn Haverbeke <[email protected]> and others
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
------------
-
The following NPM packages may be included in this product:
These packages each contain the following license and notice below:
@@ -6067,17 +6020,17 @@ SOFTWARE.
The following NPM packages may be included in this product:
These packages each contain the following license and notice below:
@@ -6137,7 +6090,7 @@ SOFTWARE.
The following NPM package may be included in this product:
- - @popperjs/[email protected]
+ - @popperjs/[email protected]
This package contains the following license and notice below:
@@ -6467,7 +6420,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The following NPM package may be included in this product:
- - @sinonjs/[email protected]
+ - @sinonjs/[email protected]
This package contains the following license and notice below:
@@ -6488,7 +6441,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
The following NPM packages may be included in this product:
- @tagspaces/[email protected]
- - @tagspaces/[email protected]
+ - @tagspaces/[email protected]
These packages each contain the following license and notice below:
@@ -6570,7 +6523,7 @@ MIT License
The following NPM packages may be included in this product:
@@ -6579,14 +6532,14 @@ The following NPM packages may be included in this product:
@@ -8050,7 +8003,7 @@ Apache License
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -8601,6 +8554,7 @@ The following NPM packages may be included in this product:
@@ -8896,7 +8850,7 @@ THE SOFTWARE.
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -9285,7 +9239,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -10511,7 +10465,7 @@ THE SOFTWARE.
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -10601,11 +10555,11 @@ SOFTWARE.
The following NPM package may be included in this product:
This package contains the following license and notice below:
-Copyright (C) 2020 by Marijn Haverbeke <[email protected]>
+Copyright (C) 2020 by Marijn Haverbeke <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -10914,7 +10868,7 @@ SOFTWARE.
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -10942,8 +10896,8 @@ SOFTWARE.
The following NPM packages may be included in this product:
These packages each contain the following license and notice below:
@@ -11328,7 +11282,7 @@ SOFTWARE.
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -11415,7 +11369,7 @@ The following NPM packages may be included in this product:
These packages each contain the following license and notice below:
@@ -12488,7 +12442,7 @@ THE SOFTWARE.
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -13465,7 +13419,7 @@ The following NPM packages may be included in this product:
These packages each contain the following license and notice below:
@@ -15408,7 +15362,7 @@ SOFTWARE.
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -16112,13 +16066,13 @@ SOFTWARE.
The following NPM package may be included in this product:
This package contains the following license and notice below:
BSD 2-Clause License
-Copyright (c) 2010-2022, Vladimir Agafonkin
+Copyright (c) 2010-2023, Volodymyr Agafonkin
Copyright (c) 2010-2011, CloudMade
All rights reserved.
@@ -16674,7 +16628,7 @@ The following NPM packages may be included in this product:
@@ -16682,14 +16636,14 @@ The following NPM packages may be included in this product:
@@ -17399,7 +17353,7 @@ Copyright (c) 2012, Mike Adair, Richard Greenwood, Didier Richard, Stephen Irons
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -17413,27 +17367,54 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-The core CommonMark constructs needed to tokenize markdown.
+[micromark][] constructs that make up the core of CommonMark.
Some of these can be [turned off][disable], but they are often essential to
markdown and weird things might happen.
## Contents
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
+* [Types](#types)
+* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
+## What is this?
+
+This package exposes the default constructs.
+
+## When should I use this?
+
+This package is useful when you are making your own micromark extensions.
+
## Install
-[npm][]:
+This package is [ESM only][esm].
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-core-commonmark
```
+In Deno with [`esm.sh`][esmsh]:
+
+```js
+import * as core from 'https://esm.sh/micromark-core-commonmark@1'
+```
+
+In browsers with [`esm.sh`][esmsh]:
+
+```html
+<script type="module">
+ import * as core from 'https://esm.sh/micromark-core-commonmark@1?bundle'
+</script>
+```
+
## Use
```js
@@ -17452,12 +17433,27 @@ This module exports the following identifiers: `attention`, `autolink`,
`thematicBreak`.
There is no default export.
-Each identifier refers to a [construct](https://github.com/micromark/micromark#constructs).
+Each identifier refers to a [construct][].
See the code for more on the exported constructs.
+## Types
+
+This package is fully typed with [TypeScript][].
+It exports no additional types.
+
+## Compatibility
+
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
+
+This package works with `micromark` version 3+.
+
## Security
+This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
@@ -17489,9 +17485,9 @@ abide by its terms.
[downloads]: https://www.npmjs.com/package/micromark-core-commonmark
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-core-commonmark.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-core-commonmark
-[bundle-size]: https://bundlephobia.com/result?p=micromark-core-commonmark
+[bundle-size]: https://bundlejs.com/?q=micromark-core-commonmark
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -17501,6 +17497,10 @@ abide by its terms.
[npm]: https://docs.npmjs.com/cli/install
+[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
+
+[esmsh]: https://esm.sh
+
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
@@ -17511,21 +17511,27 @@ abide by its terms.
[health]: https://github.com/micromark/.github
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[support]: https://github.com/micromark/.github/blob/main/support.md
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
[disable]: https://github.com/micromark/micromark#case-turn-off-constructs
+[construct]: https://github.com/micromark/micromark#constructs
+
+[typescript]: https://www.typescriptlang.org
+
+[micromark]: https://github.com/micromark/micromark
+
-----------
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -17539,26 +17545,53 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-micromark factory to parse destinations (found in resources, definitions).
+[micromark][] factory to parse destinations (found in resources, definitions).
## Contents
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`factoryDestination(…)`](#factorydestination)
+* [Types](#types)
+* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
+## What is this?
+
+This package exposes states to parse destinations.
+
+## When should I use this?
+
+This package is useful when you are making your own micromark extensions.
+
## Install
-[npm][]:
+This package is [ESM only][esm].
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-factory-destination
```
+In Deno with [`esm.sh`][esmsh]:
+
+```js
+import {factoryDestination} from 'https://esm.sh/micromark-factory-destination@1'
+```
+
+In browsers with [`esm.sh`][esmsh]:
+
+```html
+<script type="module">
+ import {factoryDestination} from 'https://esm.sh/micromark-factory-destination@1?bundle'
+</script>
+```
+
## Use
```js
@@ -17567,7 +17600,10 @@ import {codes} from 'micromark-util-symbol/codes'
import {types} from 'micromark-util-symbol/types'
// A micromark tokenizer that uses the factory:
-/** @type {Tokenizer} */
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
function tokenizeResource(effects, ok, nok) {
return start
@@ -17598,26 +17634,13 @@ function tokenizeResource(effects, ok, nok) {
## API
-This module exports the following identifiers: `factoryDestination`.
+This module exports the identifier
+[`factoryDestination`][api-factory-destination].
There is no default export.
### `factoryDestination(…)`
-###### Parameters
-
-* `effects` (`Effects`) — Context
-* `ok` (`State`) — State switched to when successful
-* `nok` (`State`) — State switched to when not successful
-* `type` (`string`) — Token type for whole (`<a>` or `b`)
-* `literalType` (`string`) — Token type when enclosed (`<a>`)
-* `literalMarkerType` (`string`) — Token type for enclosing (`<` and `>`)
-* `rawType` (`string`) — Token type when not enclosed (`b`)
-* `stringType` (`string`) — Token type for the URI (`a` or `b`)
-* `max` (`number`, default: `Infinity`) — Max depth of nested parens
-
-###### Returns
-
-`State`.
+Parse destinations.
###### Examples
@@ -17632,8 +17655,48 @@ a(b)c
a(b)
```
+###### Parameters
+
+* `effects` (`Effects`)
+ — context
+* `ok` (`State`)
+ — state switched to when successful
+* `nok` (`State`)
+ — state switched to when unsuccessful
+* `type` (`string`)
+ — type for whole (`<a>` or `b`)
+* `literalType` (`string`)
+ — type when enclosed (`<a>`)
+* `literalMarkerType` (`string`)
+ — type for enclosing (`<` and `>`)
+* `rawType` (`string`)
+ — type when not enclosed (`b`)
+* `stringType` (`string`)
+ — type for the value (`a` or `b`)
+* `max` (`number`, default: `Infinity`)
+ — depth of nested parens (inclusive)
+
+###### Returns
+
+Start state (`State`).
+
+## Types
+
+This package is fully typed with [TypeScript][].
+It exports no additional types.
+
+## Compatibility
+
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
+
+This package works with `micromark` version 3+.
+
## Security
+This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
@@ -17665,9 +17728,9 @@ abide by its terms.
[downloads]: https://www.npmjs.com/package/micromark-factory-destination
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-factory-destination.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-factory-destination
-[bundle-size]: https://bundlephobia.com/result?p=micromark-factory-destination
+[bundle-size]: https://bundlejs.com/?q=micromark-factory-destination
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -17677,6 +17740,10 @@ abide by its terms.
[npm]: https://docs.npmjs.com/cli/install
+[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
+
+[esmsh]: https://esm.sh
+
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
@@ -17687,19 +17754,25 @@ abide by its terms.
[health]: https://github.com/micromark/.github
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
+
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
+
+[support]: https://github.com/micromark/.github/blob/main/support.md
+
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[typescript]: https://www.typescriptlang.org
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[micromark]: https://github.com/micromark/micromark
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[api-factory-destination]: #factorydestination
-----------
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -17713,26 +17786,53 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-micromark factory to parse labels (found in media, definitions).
+[micromark][] factory to parse labels (found in media, definitions).
## Contents
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`factoryLabel(…)`](#factorylabel)
+* [Types](#types)
+* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
+## What is this?
+
+This package exposes states to parse labels.
+
+## When should I use this?
+
+This package is useful when you are making your own micromark extensions.
+
## Install
-[npm][]:
+This package is [ESM only][esm].
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-factory-label
```
+In Deno with [`esm.sh`][esmsh]:
+
+```js
+import {factoryLabel} from 'https://esm.sh/micromark-factory-label@1'
+```
+
+In browsers with [`esm.sh`][esmsh]:
+
+```html
+<script type="module">
+ import {factoryLabel} from 'https://esm.sh/micromark-factory-label@1?bundle'
+</script>
+```
+
## Use
```js
@@ -17742,7 +17842,10 @@ import {codes} from 'micromark-util-symbol/codes'
import {types} from 'micromark-util-symbol/types'
// A micromark tokenizer that uses the factory:
-/** @type {Tokenizer} */
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
function tokenizeDefinition(effects, ok, nok) {
return start
@@ -17769,26 +17872,14 @@ function tokenizeDefinition(effects, ok, nok) {
## API
-This module exports the following identifiers: `factoryLabel`.
+This module exports the identifier [`factoryLabel`][api-factory-label].
There is no default export.
### `factoryLabel(…)`
-Note that labels in markdown are capped at 999 characters in the string.
-
-###### Parameters
-
-* `this` (`TokenizeContext`) — Tokenize context
-* `effects` (`Effects`) — Context
-* `ok` (`State`) — State switched to when successful
-* `nok` (`State`) — State switched to when not successful
-* `type` (`string`) — Token type for whole (`[a]`)
-* `markerType` (`string`) — Token type for the markers (`[` and `]`)
-* `stringType` (`string`) — Token type for the identifier (`a`)
-
-###### Returns
+Parse labels.
-`State`.
+> 👉 **Note**: labels in markdown are capped at 999 characters in the string.
###### Examples
@@ -17799,8 +17890,44 @@ b]
[a\]b]
```
+###### Parameters
+
+* `this` (`TokenizeContext`)
+ — tokenize context
+* `effects` (`Effects`)
+ — context
+* `ok` (`State`)
+ — state switched to when successful
+* `nok` (`State`)
+ — state switched to when unsuccessful
+* `type` (`string`)
+ — type of the whole label (`[a]`)
+* `markerType` (`string`)
+ — type for the markers (`[` and `]`)
+* `stringType` (`string`)
+ — type for the identifier (`a`)
+
+###### Returns
+
+Start state (`State`).
+
+## Types
+
+This package is fully typed with [TypeScript][].
+It exports no additional types.
+
+## Compatibility
+
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
+
+This package works with `micromark` version 3+.
+
## Security
+This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
@@ -17832,9 +17959,9 @@ abide by its terms.
[downloads]: https://www.npmjs.com/package/micromark-factory-label
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-factory-label.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-factory-label
-[bundle-size]: https://bundlephobia.com/result?p=micromark-factory-label
+[bundle-size]: https://bundlejs.com/?q=micromark-factory-label
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -17844,6 +17971,10 @@ abide by its terms.
[npm]: https://docs.npmjs.com/cli/install
+[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
+
+[esmsh]: https://esm.sh
+
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
@@ -17854,19 +17985,25 @@ abide by its terms.
[health]: https://github.com/micromark/.github
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
+
+[support]: https://github.com/micromark/.github/blob/main/support.md
+
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
+
+[typescript]: https://www.typescriptlang.org
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[micromark]: https://github.com/micromark/micromark
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[api-factory-label]: #factorylabel
-----------
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -17880,27 +18017,54 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-micromark factory to parse [markdown space][markdown-space] (found in lots of
-places).
+[micromark][] factory to parse [markdown space][markdown-space] (found in lots
+of places).
## Contents
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`factorySpace(…)`](#factoryspace)
+* [Types](#types)
+* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
+## What is this?
+
+This package exposes states to parse spaces and/or tabs.
+
+## When should I use this?
+
+This package is useful when you are making your own micromark extensions.
+
## Install
-[npm][]:
+This package is [ESM only][esm].
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-factory-space
```
+In Deno with [`esm.sh`][esmsh]:
+
+```js
+import {factorySpace} from 'https://esm.sh/micromark-factory-space@1'
+```
+
+In browsers with [`esm.sh`][esmsh]:
+
+```html
+<script type="module">
+ import {factorySpace} from 'https://esm.sh/micromark-factory-space@1?bundle'
+</script>
+```
+
## Use
```js
@@ -17909,7 +18073,10 @@ import {codes} from 'micromark-util-symbol/codes'
import {types} from 'micromark-util-symbol/types'
// A micromark tokenizer that uses the factory:
-/** @type {Tokenizer} */
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
function tokenizeCodeFenced(effects, ok, nok) {
return start
@@ -17934,28 +18101,19 @@ function tokenizeCodeFenced(effects, ok, nok) {
## API
-This module exports the following identifiers: `factorySpace`.
+This module exports the identifier [`factorySpace`][api-factory-space].
There is no default export.
### `factorySpace(…)`
-Note that there is no `nok` parameter:
-
-* spaces in markdown are often optional, in which case this factory can be
- used and `ok` will be switched to whether spaces were found or not,
-* One space character can be detected with
- [markdownSpace(code)][markdown-space] right before using `factorySpace`
-
-###### Parameters
-
-* `effects` (`Effects`) — Context
-* `ok` (`State`) — State switched to when successful
-* `type` (`string`) — Token type for whole (`' \t'`)
-* `max` (`number`, default: `Infinity`) — Max size of whitespace
+Parse spaces and tabs.
-###### Returns
+There is no `nok` parameter:
-`State`.
+* spaces in markdown are often optional, in which case this factory can be
+ used and `ok` will be switched to whether spaces were found or not
+* one line ending or space can be detected with `markdownSpace(code)` right
+ before using `factorySpace`
###### Examples
@@ -17968,22 +18126,52 @@ single space.
␉␠
```
-## Security
+###### Parameters
-See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
-submit a security report.
+* `effects` (`Effects`)
+ — context
+* `ok` (`State`)
+ — state switched to when successful
+* `type` (`string`)
+ — type (`' \t'`)
+* `max` (`number`, default: `Infinity`)
+ — max (exclusive)
-## Contribute
+###### Returns
-See [`contributing.md`][contributing] in [`micromark/.github`][health] for ways
-to get started.
-See [`support.md`][support] for ways to get help.
+Start state (`State`).
-This project has a [code of conduct][coc].
-By interacting with this repository, organisation, or community you agree to
-abide by its terms.
+## Types
-## License
+This package is fully typed with [TypeScript][].
+It exports no additional types.
+
+## Compatibility
+
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
+
+This package works with `micromark` version 3+.
+
+## Security
+
+This package is safe.
+See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
+submit a security report.
+
+## Contribute
+
+See [`contributing.md`][contributing] in [`micromark/.github`][health] for ways
+to get started.
+See [`support.md`][support] for ways to get help.
+
+This project has a [code of conduct][coc].
+By interacting with this repository, organisation, or community you agree to
+abide by its terms.
+
+## License
[MIT][license] © [Titus Wormer][author]
@@ -18001,9 +18189,9 @@ abide by its terms.
[downloads]: https://www.npmjs.com/package/micromark-factory-space
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-factory-space.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-factory-space
-[bundle-size]: https://bundlephobia.com/result?p=micromark-factory-space
+[bundle-size]: https://bundlejs.com/?q=micromark-factory-space
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -18013,6 +18201,10 @@ abide by its terms.
[npm]: https://docs.npmjs.com/cli/install
+[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
+
+[esmsh]: https://esm.sh
+
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
@@ -18023,21 +18215,27 @@ abide by its terms.
[health]: https://github.com/micromark/.github
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[support]: https://github.com/micromark/.github/blob/main/support.md
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
[markdown-space]: https://github.com/micromark/micromark/tree/main/packages/micromark-util-character#markdownspacecode
+[typescript]: https://www.typescriptlang.org
+
+[micromark]: https://github.com/micromark/micromark
+
+[api-factory-space]: #factoryspace
+
-----------
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -18051,26 +18249,54 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-micromark factory to parse markdown titles (found in resources, definitions).
+[micromark][] factory to parse markdown titles (found in resources,
+definitions).
## Contents
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`factoryTitle(…)`](#factorytitle)
+* [Types](#types)
+* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
+## What is this?
+
+This package exposes states to parse titles.
+
+## When should I use this?
+
+This package is useful when you are making your own micromark extensions.
+
## Install
-[npm][]:
+This package is [ESM only][esm].
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-factory-title
```
+In Deno with [`esm.sh`][esmsh]:
+
+```js
+import {factorySpace} from 'https://esm.sh/micromark-factory-title@1'
+```
+
+In browsers with [`esm.sh`][esmsh]:
+
+```html
+<script type="module">
+ import {factorySpace} from 'https://esm.sh/micromark-factory-title@1?bundle'
+</script>
+```
+
## Use
```js
@@ -18079,7 +18305,10 @@ import {codes} from 'micromark-util-symbol/codes'
import {types} from 'micromark-util-symbol/types'
// A micromark tokenizer that uses the factory:
-/** @type {Tokenizer} */
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
function tokenizeDefinition(effects, ok, nok) {
return start
@@ -18111,24 +18340,12 @@ function tokenizeDefinition(effects, ok, nok) {
## API
-This module exports the following identifiers: `factoryTitle`.
+This module exports the identifier [`factoryTitle`][api-factory-title].
There is no default export.
### `factoryTitle(…)`
-###### Parameters
-
-* `effects` (`Effects`) — Context
-* `ok` (`State`) — State switched to when successful
-* `nok` (`State`) — State switched to when not successful
-* `type` (`string`) — Token type for whole (`"a"`, `'b'`, `(c)`)
-* `markerType` (`string`) — Token type for the markers (`"`, `'`, `(`, and
- `)`)
-* `stringType` (`string`) — Token type for the value (`a`)
-
-###### Returns
-
-`State`.
+Parse titles.
###### Examples
@@ -18143,8 +18360,42 @@ b"
(a\)b)
```
+###### Parameters
+
+* `effects` (`Effects`)
+ — context
+* `ok` (`State`)
+ — state switched to when successful
+* `nok` (`State`)
+ — state switched to when unsuccessful
+* `type` (`string`)
+ — type of the whole title (`"a"`, `'b'`, `(c)`)
+* `markerType` (`string`)
+ — type for the markers (`"`, `'`, `(`, and `)`)
+* `stringType` (`string`)
+ — type for the value (`a`)
+
+###### Returns
+
+Start state (`State`).
+
+## Types
+
+This package is fully typed with [TypeScript][].
+It exports no additional types.
+
+## Compatibility
+
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
+
+This package works with `micromark` version 3+.
+
## Security
+This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
@@ -18176,9 +18427,9 @@ abide by its terms.
[downloads]: https://www.npmjs.com/package/micromark-factory-title
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-factory-title.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-factory-title
-[bundle-size]: https://bundlephobia.com/result?p=micromark-factory-title
+[bundle-size]: https://bundlejs.com/?q=micromark-factory-title
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -18188,6 +18439,10 @@ abide by its terms.
[npm]: https://docs.npmjs.com/cli/install
+[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
+
+[esmsh]: https://esm.sh
+
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
@@ -18198,19 +18453,25 @@ abide by its terms.
[health]: https://github.com/micromark/.github
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
+
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[support]: https://github.com/micromark/.github/blob/main/support.md
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[typescript]: https://www.typescriptlang.org
+
+[micromark]: https://github.com/micromark/micromark
+
+[api-factory-title]: #factorytitle
-----------
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -18224,27 +18485,54 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-micromark factory to parse [markdown line endings or spaces][ws] (found in lots
-of places).
+[micromark][] factory to parse [markdown line endings or spaces][ws] (found in
+lots of places).
## Contents
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`factoryWhitespace(…)`](#factorywhitespace)
+* [Types](#types)
+* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
+## What is this?
+
+This package exposes states to parse whitespace.
+
+## When should I use this?
+
+This package is useful when you are making your own micromark extensions.
+
## Install
-[npm][]:
+This package is [ESM only][esm].
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-factory-whitespace
```
+In Deno with [`esm.sh`][esmsh]:
+
+```js
+import {factoryWhitespace} from 'https://esm.sh/micromark-factory-whitespace@1'
+```
+
+In browsers with [`esm.sh`][esmsh]:
+
+```html
+<script type="module">
+ import {factoryWhitespace} from 'https://esm.sh/micromark-factory-whitespace@1?bundle'
+</script>
+```
+
## Use
```js
@@ -18253,7 +18541,10 @@ import {codes} from 'micromark-util-symbol/codes'
import {types} from 'micromark-util-symbol/types'
// A micromark tokenizer that uses the factory:
-/** @type {Tokenizer} */
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
function tokenizeTitle(effects, ok, nok) {
return start
@@ -18270,30 +18561,51 @@ function tokenizeTitle(effects, ok, nok) {
## API
-This module exports the following identifiers: `factoryWhitespace`.
+This module exports the identifier
+[`factoryWhitespace`][api-factory-whitespace].
There is no default export.
### `factoryWhitespace(…)`
-Note that there is no `nok` parameter:
+Parse spaces and tabs.
+
+There is no `nok` parameter:
* line endings or spaces in markdown are often optional, in which case this
factory can be used and `ok` will be switched to whether spaces were found
- or not,
-* One line ending or space can be detected with
- [markdownLineEndingOrSpace(code)][ws] right before using `factoryWhitespace`
+ or not
+* one line ending or space can be detected with
+ [`markdownLineEndingOrSpace(code)`][ws] right before using
+ `factoryWhitespace`
###### Parameters
-* `effects` (`Effects`) — Context
-* `ok` (`State`) — State switched to when successful
+* `effects` (`Effects`)
+ — context
+* `ok` (`State`)
+ — state switched to when successful
###### Returns
-`State`.
+Start state (`State`).
+
+## Types
+
+This package is fully typed with [TypeScript][].
+It exports no additional types.
+
+## Compatibility
+
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
+
+This package works with `micromark` version 3+.
## Security
+This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
@@ -18325,9 +18637,9 @@ abide by its terms.
[downloads]: https://www.npmjs.com/package/micromark-factory-whitespace
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-factory-whitespace.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-factory-whitespace
-[bundle-size]: https://bundlephobia.com/result?p=micromark-factory-whitespace
+[bundle-size]: https://bundlejs.com/?q=micromark-factory-whitespace
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -18337,6 +18649,10 @@ abide by its terms.
[npm]: https://docs.npmjs.com/cli/install
+[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
+
+[esmsh]: https://esm.sh
+
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
@@ -18347,21 +18663,27 @@ abide by its terms.
[health]: https://github.com/micromark/.github
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[support]: https://github.com/micromark/.github/blob/main/support.md
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
[ws]: https://github.com/micromark/micromark/tree/main/packages/micromark-util-character#markdownlineendingorspacecode
+[typescript]: https://www.typescriptlang.org
+
+[micromark]: https://github.com/micromark/micromark
+
+[api-factory-whitespace]: #factorywhitespace
+
-----------
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -18375,37 +18697,64 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-micromark utility to handle [character codes](https://github.com/micromark/micromark#preprocess).
+[micromark][] utility to handle [character codes][code].
## Contents
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`asciiAlpha(code)`](#asciialphacode)
- * [`asciiDigit(code)`](#asciidigitcode)
- * [`asciiHexDigit(code)`](#asciihexdigitcode)
* [`asciiAlphanumeric(code)`](#asciialphanumericcode)
- * [`asciiPunctuation(code)`](#asciipunctuationcode)
* [`asciiAtext(code)`](#asciiatextcode)
* [`asciiControl(code)`](#asciicontrolcode)
- * [`markdownLineEndingOrSpace(code)`](#markdownlineendingorspacecode)
+ * [`asciiDigit(code)`](#asciidigitcode)
+ * [`asciiHexDigit(code)`](#asciihexdigitcode)
+ * [`asciiPunctuation(code)`](#asciipunctuationcode)
* [`markdownLineEnding(code)`](#markdownlineendingcode)
+ * [`markdownLineEndingOrSpace(code)`](#markdownlineendingorspacecode)
* [`markdownSpace(code)`](#markdownspacecode)
- * [`unicodeWhitespace(code)`](#unicodewhitespacecode)
* [`unicodePunctuation(code)`](#unicodepunctuationcode)
+ * [`unicodeWhitespace(code)`](#unicodewhitespacecode)
+* [Types](#types)
+* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
+## What is this?
+
+This package exposes algorithms to check whether characters match groups.
+
+## When should I use this?
+
+This package might be useful when you are making your own micromark extensions.
+
## Install
-[npm][]:
+This package is [ESM only][esm].
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-util-character
```
+In Deno with [`esm.sh`][esmsh]:
+
+```js
+import * as character from 'https://esm.sh/micromark-util-character@1'
+```
+
+In browsers with [`esm.sh`][esmsh]:
+
+```html
+<script type="module">
+ import * as character from 'https://esm.sh/micromark-util-character@1?bundle'
+</script>
+```
+
## Use
```js
@@ -18417,19 +18766,25 @@ console.log(asciiAlpha(65)) // true
## API
-This module exports the following identifiers: `asciiAlpha`,
-`asciiAlphanumeric`, `asciiAtext`, `asciiControl`, `asciiDigit`,
-`asciiHexDigit`, `asciiPunctuation`, `markdownLineEnding`,
-`markdownLineEndingOrSpace`, `markdownSpace`, `unicodePunctuation`,
-`unicodeWhitespace`.
+This module exports the identifiers
+[`asciiAlpha`][api-ascii-alpha],
+[`asciiAlphanumeric`][api-ascii-alphanumeric],
+[`asciiAtext`][api-ascii-atext],
+[`asciiControl`][api-ascii-control],
+[`asciiDigit`][api-ascii-digit],
+[`asciiHexDigit`][api-ascii-hex-digit],
+[`asciiPunctuation`][api-ascii-punctuation],
+[`markdownLineEnding`][api-markdown-line-ending],
+[`markdownLineEndingOrSpace`][api-markdown-line-ending-or-space],
+[`markdownSpace`][api-markdown-space],
+[`unicodePunctuation`][api-unicode-punctuation],
+[`unicodeWhitespace`][api-unicode-whitespace].
There is no default export.
### `asciiAlpha(code)`
-Check whether the
-[character code](https://github.com/micromark/micromark#preprocess)
-represents an ASCII alpha (`a` through `z`,
-case insensitive).
+Check whether the [character code][code] represents an ASCII alpha (`a` through
+`z`, case insensitive).
An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha.
@@ -18439,57 +18794,35 @@ to U+005A (`Z`).
An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`)
to U+007A (`z`).
-### `asciiDigit(code)`
-
-Check whether the
-[character code](https://github.com/micromark/micromark#preprocess)
-represents an ASCII digit (`0` through `9`).
-
-An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to
-U+0039 (`9`).
-
-### `asciiHexDigit(code)`
-
-Check whether the
-[character code](https://github.com/micromark/micromark#preprocess)
-represents an ASCII hex digit (`a` through `f`, case insensitive, or `0` through
-`9`).
+###### Parameters
-An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex
-digit, or an ASCII lower hex digit.
+* `code` (`Code`)
+ — code
-An **ASCII upper hex digit** is a character in the inclusive range U+0041
-(`A`) to U+0046 (`F`).
+###### Returns
-An **ASCII lower hex digit** is a character in the inclusive range U+0061
-(`a`) to U+0066 (`f`).
+Whether it matches (`boolean`).
### `asciiAlphanumeric(code)`
-Check whether the
-[character code](https://github.com/micromark/micromark#preprocess)
-represents an ASCII alphanumeric (`a` through `z`, case insensitive, or `0`
-through `9`).
+Check whether the [character code][code] represents an ASCII alphanumeric (`a`
+through `z`, case insensitive, or `0` through `9`).
An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha
(see `asciiAlpha`).
-### `asciiPunctuation(code)`
+###### Parameters
-Check whether the
-[character code](https://github.com/micromark/micromark#preprocess)
-represents ASCII punctuation.
+* `code` (`Code`)
+ — code
-An **ASCII punctuation** is a character in the inclusive ranges U+0021
-EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT
-SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT
-(`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`).
+###### Returns
+
+Whether it matches (`boolean`).
### `asciiAtext(code)`
-Check whether the
-[character code](https://github.com/micromark/micromark#preprocess)
-represents an ASCII atext.
+Check whether the [character code][code] represents an ASCII atext.
atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in
the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`),
@@ -18503,94 +18836,218 @@ See **\[RFC5322]**:\
P. Resnick.\
IETF.
+###### Parameters
+
+* `code` (`Code`)
+ — code
+
+###### Returns
+
+Whether it matches (`boolean`).
+
### `asciiControl(code)`
-Check whether a
-[character code](https://github.com/micromark/micromark#preprocess)
-is an ASCII control character.
+Check whether a [character code][code] is an ASCII control character.
An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL)
to U+001F (US), or U+007F (DEL).
-### `markdownLineEndingOrSpace(code)`
-
-Check whether a
-[character code](https://github.com/micromark/micromark#preprocess)
-is a markdown line ending (see `markdownLineEnding`) or markdown space (see
-`markdownSpace`).
+###### Parameters
-### `markdownLineEnding(code)`
+* `code` (`Code`)
+ — code
-Check whether a
-[character code](https://github.com/micromark/micromark#preprocess)
-is a markdown line ending.
+###### Returns
-A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN
-LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR).
+Whether it matches (`boolean`).
-In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE
-RETURN (CR) are replaced by these virtual characters depending on whether
-they occurred together.
+### `asciiDigit(code)`
-### `markdownSpace(code)`
+Check whether the [character code][code] represents an ASCII digit (`0` through
+`9`).
-Check whether a
-[character code](https://github.com/micromark/micromark#preprocess)
-is a markdown space.
+An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to
+U+0039 (`9`).
-A **markdown space** is the concrete character U+0020 SPACE (SP) and the
-virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT).
+###### Parameters
-In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is
-replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL
-SPACE (VS) characters, depending on the column at which the tab occurred.
+* `code` (`Code`)
+ — code
-### `unicodeWhitespace(code)`
+###### Returns
-Check whether the
-[character code](https://github.com/micromark/micromark#preprocess)
-represents Unicode whitespace.
+Whether it matches (`boolean`).
-Note that this does handle micromark specific markdown whitespace characters.
-See `markdownLineEndingOrSpace` to check that.
+### `asciiHexDigit(code)`
-A **Unicode whitespace** is a character in the Unicode `Zs` (Separator,
-Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF),
-U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**).
+Check whether the [character code][code] represents an ASCII hex digit (`a`
+through `f`, case insensitive, or `0` through `9`).
-See **\[UNICODE]**:\
-[The Unicode Standard](https://www.unicode.org/versions/).\
-Unicode Consortium.
+An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex
+digit, or an ASCII lower hex digit.
-### `unicodePunctuation(code)`
+An **ASCII upper hex digit** is a character in the inclusive range U+0041
+(`A`) to U+0046 (`F`).
-Check whether the
-[character code](https://github.com/micromark/micromark#preprocess)
-represents Unicode punctuation.
+An **ASCII lower hex digit** is a character in the inclusive range U+0061
+(`a`) to U+0066 (`f`).
-A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation,
-Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf`
-(Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po`
-(Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII
-punctuation (see `asciiPunctuation`) (**\[UNICODE]**).
+###### Parameters
-See **\[UNICODE]**:\
-[The Unicode Standard](https://www.unicode.org/versions/).\
-Unicode Consortium.
+* `code` (`Code`)
+ — code
-## Security
+###### Returns
-See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
-submit a security report.
+Whether it matches (`boolean`).
-## Contribute
+### `asciiPunctuation(code)`
-See [`contributing.md`][contributing] in [`micromark/.github`][health] for ways
-to get started.
-See [`support.md`][support] for ways to get help.
+Check whether the [character code][code] represents ASCII punctuation.
-This project has a [code of conduct][coc].
-By interacting with this repository, organisation, or community you agree to
+An **ASCII punctuation** is a character in the inclusive ranges U+0021
+EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT
+SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT
+(`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`).
+
+###### Parameters
+
+* `code` (`Code`)
+ — code
+
+###### Returns
+
+Whether it matches (`boolean`).
+
+### `markdownLineEnding(code)`
+
+Check whether a [character code][code] is a markdown line ending.
+
+A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN
+LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR).
+
+In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE
+RETURN (CR) are replaced by these virtual characters depending on whether
+they occurred together.
+
+###### Parameters
+
+* `code` (`Code`)
+ — code
+
+###### Returns
+
+Whether it matches (`boolean`).
+
+### `markdownLineEndingOrSpace(code)`
+
+Check whether a [character code][code] is a markdown line ending (see
+`markdownLineEnding`) or markdown space (see `markdownSpace`).
+
+###### Parameters
+
+* `code` (`Code`)
+ — code
+
+###### Returns
+
+Whether it matches (`boolean`).
+
+### `markdownSpace(code)`
+
+Check whether a [character code][code] is a markdown space.
+
+A **markdown space** is the concrete character U+0020 SPACE (SP) and the
+virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT).
+
+In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is
+replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL
+SPACE (VS) characters, depending on the column at which the tab occurred.
+
+###### Parameters
+
+* `code` (`Code`)
+ — code
+
+###### Returns
+
+Whether it matches (`boolean`).
+
+### `unicodePunctuation(code)`
+
+Check whether the [character code][code] represents Unicode punctuation.
+
+A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation,
+Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf`
+(Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po`
+(Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII
+punctuation (see `asciiPunctuation`) (**\[UNICODE]**).
+
+See **\[UNICODE]**:\
+[The Unicode Standard](https://www.unicode.org/versions/).\
+Unicode Consortium.
+
+###### Parameters
+
+* `code` (`Code`)
+ — code
+
+###### Returns
+
+Whether it matches (`boolean`).
+
+### `unicodeWhitespace(code)`
+
+Check whether the [character code][code] represents Unicode whitespace.
+
+Note that this does handle micromark specific markdown whitespace characters.
+See `markdownLineEndingOrSpace` to check that.
+
+A **Unicode whitespace** is a character in the Unicode `Zs` (Separator,
+Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF),
+U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**).
+
+See **\[UNICODE]**:\
+[The Unicode Standard](https://www.unicode.org/versions/).\
+Unicode Consortium.
+
+###### Parameters
+
+* `code` (`Code`)
+ — code
+
+###### Returns
+
+Whether it matches (`boolean`).
+
+## Types
+
+This package is fully typed with [TypeScript][].
+It exports no additional types.
+
+## Compatibility
+
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
+
+This package works with `micromark` version 3+.
+
+## Security
+
+This package is safe.
+See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
+submit a security report.
+
+## Contribute
+
+See [`contributing.md`][contributing] in [`micromark/.github`][health] for ways
+to get started.
+See [`support.md`][support] for ways to get help.
+
+This project has a [code of conduct][coc].
+By interacting with this repository, organisation, or community you agree to
abide by its terms.
## License
@@ -18611,9 +19068,9 @@ abide by its terms.
[downloads]: https://www.npmjs.com/package/micromark-util-character
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-util-character.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-util-character
-[bundle-size]: https://bundlephobia.com/result?p=micromark-util-character
+[bundle-size]: https://bundlejs.com/?q=micromark-util-character
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -18623,6 +19080,10 @@ abide by its terms.
[npm]: https://docs.npmjs.com/cli/install
+[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
+
+[esmsh]: https://esm.sh
+
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
@@ -18633,19 +19094,49 @@ abide by its terms.
[health]: https://github.com/micromark/.github
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
+
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
+
+[support]: https://github.com/micromark/.github/blob/main/support.md
+
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
+
+[typescript]: https://www.typescriptlang.org
+
+[micromark]: https://github.com/micromark/micromark
+
+[code]: https://github.com/micromark/micromark#preprocess
+
+[api-ascii-alpha]: #asciialphacode
+
+[api-ascii-alphanumeric]: #asciialphanumericcode
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[api-ascii-atext]: #asciiatextcode
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[api-ascii-control]: #asciicontrolcode
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[api-ascii-digit]: #asciidigitcode
+
+[api-ascii-hex-digit]: #asciihexdigitcode
+
+[api-ascii-punctuation]: #asciipunctuationcode
+
+[api-markdown-line-ending]: #markdownlineendingcode
+
+[api-markdown-line-ending-or-space]: #markdownlineendingorspacecode
+
+[api-markdown-space]: #markdownspacecode
+
+[api-unicode-punctuation]: #unicodepunctuationcode
+
+[api-unicode-whitespace]: #unicodewhitespacecode
-----------
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -18659,27 +19150,55 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-micromark utility to splice and push with giant arrays.
+[micromark][] utility to splice and push with giant arrays.
## Contents
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`push(list, items)`](#pushlist-items)
* [`splice(list, start, remove, items)`](#splicelist-start-remove-items)
+* [Types](#types)
+* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
+## What is this?
+
+This package exposes an algorithm to splice for giant arrays, which V8 bugs
+out on.
+
+## When should I use this?
+
+This package might be useful when you are making your own micromark extensions.
+
## Install
-[npm][]:
+This package is [ESM only][esm].
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-util-chunked
```
+In Deno with [`esm.sh`][esmsh]:
+
+```js
+import {push, splice} from 'https://esm.sh/micromark-util-chunked@1'
+```
+
+In browsers with [`esm.sh`][esmsh]:
+
+```html
+<script type="module">
+ import {push, splice} from 'https://esm.sh/micromark-util-chunked@1?bundle'
+</script>
+```
+
## Use
```js
@@ -18701,7 +19220,8 @@ splice(events, open - 1, index - open + 3, nextEvents)
## API
-This module exports the following identifiers: `push`, `splice`.
+This module exports the identifiers [`push`][api-push]
+and [`splice`][api-splice].
There is no default export.
### `push(list, items)`
@@ -18714,12 +19234,14 @@ and adds items in batches to prevent V8 from hanging.
###### Parameters
-* `list` (`unknown[]`) — List to operate on
-* `items` (`unknown[]`) — Items to add to `list`
+* `list` (`Array<unknown>`)
+ — list to operate on
+* `items` (`Array<unknown>`)
+ — items to add to `list`
###### Returns
-`list` or `items`
+Either `list` or `items` (`Array<unknown>`).
### `splice(list, start, remove, items)`
@@ -18733,17 +19255,36 @@ array instead of rest parameters.
###### Parameters
-* `list` (`unknown[]`) — List to operate on
-* `start` (`number`) — Index to remove/insert at (can be negative)
-* `remove` (`number`) — Number of items to remove
-* `items` (`unknown[]`) — Items to inject into `list`
+* `list` (`Array<unknown>`)
+ — list to operate on
+* `start` (`number`)
+ — index to remove/insert at (can be negative)
+* `remove` (`number`)
+ — number of items to remove
+* `items` (`Array<unknown>`)
+ — items to inject into `list`
###### Returns
-`void`
+Nothing (`void`).
+
+## Types
+
+This package is fully typed with [TypeScript][].
+It exports no additional types.
+
+## Compatibility
+
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
+
+This package works with `micromark` version 3+.
## Security
+This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
@@ -18775,9 +19316,9 @@ abide by its terms.
[downloads]: https://www.npmjs.com/package/micromark-util-chunked
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-util-chunked.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-util-chunked
-[bundle-size]: https://bundlephobia.com/result?p=micromark-util-chunked
+[bundle-size]: https://bundlejs.com/?q=micromark-util-chunked
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -18787,6 +19328,10 @@ abide by its terms.
[npm]: https://docs.npmjs.com/cli/install
+[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
+
+[esmsh]: https://esm.sh
+
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
@@ -18797,19 +19342,27 @@ abide by its terms.
[health]: https://github.com/micromark/.github
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
+
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
+
+[support]: https://github.com/micromark/.github/blob/main/support.md
+
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[typescript]: https://www.typescriptlang.org
+
+[micromark]: https://github.com/micromark/micromark
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[api-push]: #pushlist-items
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[api-splice]: #splicelist-start-remove-items
-----------
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -18823,30 +19376,61 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-micromark utility to classify whether a character is whitespace or punctuation.
+[micromark][] utility to classify whether a character is whitespace or
+punctuation.
## Contents
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`classifyCharacter(code)`](#classifycharactercode)
+* [Types](#types)
+* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
+## What is this?
+
+This package exposes an algorithm to classify characters into 3 categories.
+
+## When should I use this?
+
+This package might be useful when you are making your own micromark extensions.
+
## Install
-[npm][]:
+This package is [ESM only][esm].
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-util-classify-character
```
+In Deno with [`esm.sh`][esmsh]:
+
+```js
+import {classifyCharacter} from 'https://esm.sh/micromark-util-classify-character@1'
+```
+
+In browsers with [`esm.sh`][esmsh]:
+
+```html
+<script type="module">
+ import {classifyCharacter} from 'https://esm.sh/micromark-util-classify-character@1?bundle'
+</script>
+```
+
## Use
```js
-/** @type {Tokenizer} */
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
function tokenizeAttention(effects, ok) {
return start
@@ -18873,27 +19457,47 @@ function tokenizeAttention(effects, ok) {
## API
-This module exports the following identifiers: `classifyCharacter`.
+This module exports the identifier
+[`classifyCharacter`][api-classify-character].
There is no default export.
### `classifyCharacter(code)`
-Classify whether a
-[character code](https://github.com/micromark/micromark#preprocess)
-represents whitespace, punctuation, or
-something else.
-Used for attention (emphasis, strong), whose sequences can open or close based
-on the class of surrounding characters.
+Classify whether a code represents whitespace, punctuation, or something
+else.
+
+Used for attention (emphasis, strong), whose sequences can open or close
+based on the class of surrounding characters.
-Note that eof (`null`) is seen as whitespace.
+> 👉 **Note**: eof (`null`) is seen as whitespace.
+
+###### Parameters
+
+* `code` (`Code`)
+ — code
###### Returns
-`constants.characterGroupWhitespace`, `constants.characterGroupPunctuation`,
-or `undefined.`
+Group (`constants.characterGroupWhitespace`,
+`constants.characterGroupPunctuation`, or `undefined`).
+
+## Types
+
+This package is fully typed with [TypeScript][].
+It exports no additional types.
+
+## Compatibility
+
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
+
+This package works with `micromark` version 3+.
## Security
+This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
@@ -18925,9 +19529,9 @@ abide by its terms.
[downloads]: https://www.npmjs.com/package/micromark-util-classify-character
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-util-classify-character.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-util-classify-character
-[bundle-size]: https://bundlephobia.com/result?p=micromark-util-classify-character
+[bundle-size]: https://bundlejs.com/?q=micromark-util-classify-character
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -18937,6 +19541,10 @@ abide by its terms.
[npm]: https://docs.npmjs.com/cli/install
+[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
+
+[esmsh]: https://esm.sh
+
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
@@ -18947,19 +19555,25 @@ abide by its terms.
[health]: https://github.com/micromark/.github
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
+
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
+
+[support]: https://github.com/micromark/.github/blob/main/support.md
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[typescript]: https://www.typescriptlang.org
+
+[micromark]: https://github.com/micromark/micromark
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[api-classify-character]: #classifycharactercode
-----------
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -18973,27 +19587,55 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-micromark utility to combine [syntax][] or [html][] extensions.
+[micromark][] utility to combine [syntax][] or [html][] extensions.
## Contents
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`combineExtensions(extensions)`](#combineextensionsextensions)
* [`combineHtmlExtensions(htmlExtensions)`](#combinehtmlextensionshtmlextensions)
+* [Types](#types)
+* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
+## What is this?
+
+This package can merge multiple extensions into one.
+
+## When should I use this?
+
+This package might be useful when you are making “presets”, such as
+[`micromark-extension-gfm`][micromark-extension-gfm].
+
## Install
-[npm][]:
+This package is [ESM only][esm].
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-util-combine-extensions
```
+In Deno with [`esm.sh`][esmsh]:
+
+```js
+import {combineExtensions} from 'https://esm.sh/micromark-util-combine-extensions@1'
+```
+
+In browsers with [`esm.sh`][esmsh]:
+
+```html
+<script type="module">
+ import {combineExtensions} from 'https://esm.sh/micromark-util-combine-extensions@1?bundle'
+</script>
+```
+
## Use
```js
@@ -19008,17 +19650,19 @@ const gfm = combineExtensions([gfmAutolinkLiteral, gfmStrikethrough(), gfmTable,
## API
-This module exports the following identifiers: `combineExtensions`,
-`combineHtmlExtensions`.
+This module exports the identifiers
+[`combineExtensions`][api-combine-extensions] and
+[`combineHtmlExtensions`][api-combine-html-extensions].
There is no default export.
### `combineExtensions(extensions)`
-Combine several syntax extensions into one.
+Combine multiple syntax extensions into one.
###### Parameters
-* `extensions` (`Extension[]`) — List of syntax extensions
+* `extensions` (`Array<Extension>`)
+ — list of syntax extensions
###### Returns
@@ -19026,22 +19670,38 @@ A single combined extension (`Extension`).
### `combineHtmlExtensions(htmlExtensions)`
-Combine several html extensions into one.
+Combine multiple html extensions into one.
###### Parameters
-* `htmlExtensions` (`HtmlExtension[]`) — List of html extensions
+* `htmlExtensions` (`Array<HtmlExtension>`)
+ — list of HTML extensions
###### Returns
-A single combined html extension (`HtmlExtension`).
+A single combined HTML extension (`HtmlExtension`).
-## Security
+## Types
-See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
-submit a security report.
+This package is fully typed with [TypeScript][].
+It exports no additional types.
-## Contribute
+## Compatibility
+
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
+
+This package works with `micromark` version 3+.
+
+## Security
+
+This package is safe.
+See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
+submit a security report.
+
+## Contribute
See [`contributing.md`][contributing] in [`micromark/.github`][health] for ways
to get started.
@@ -19069,9 +19729,9 @@ abide by its terms.
[downloads]: https://www.npmjs.com/package/micromark-util-combine-extensions
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-util-combine-extensions.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-util-combine-extensions
-[bundle-size]: https://bundlephobia.com/result?p=micromark-util-combine-extensions
+[bundle-size]: https://bundlejs.com/?q=micromark-util-combine-extensions
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -19081,6 +19741,10 @@ abide by its terms.
[npm]: https://docs.npmjs.com/cli/install
+[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
+
+[esmsh]: https://esm.sh
+
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
@@ -19091,23 +19755,33 @@ abide by its terms.
[health]: https://github.com/micromark/.github
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[support]: https://github.com/micromark/.github/blob/main/support.md
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
[syntax]: https://github.com/micromark/micromark#syntaxextension
[html]: https://github.com/micromark/micromark#htmlextension
+[typescript]: https://www.typescriptlang.org
+
+[micromark]: https://github.com/micromark/micromark
+
+[micromark-extension-gfm]: https://github.com/micromark/micromark-extension-gfm
+
+[api-combine-extensions]: #combineextensionsextensions
+
+[api-combine-html-extensions]: #combinehtmlextensionshtmlextensions
+
-----------
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -19121,26 +19795,53 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-micromark utility to decode numeric character references.
+[micromark][] utility to decode numeric character references.
## Contents
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
- * [`decodeNumericCharacterReference(value)`](#decodenumericcharacterreferencevalue)
+ * [`decodeNumericCharacterReference(value, base)`](#decodenumericcharacterreferencevalue-base)
+* [Types](#types)
+* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
+## What is this?
+
+This package exposes an algorithm to decode numeric character references.
+
+## When should I use this?
+
+This package might be useful when you are making your own micromark extensions.
+
## Install
-[npm][]:
+This package is [ESM only][esm].
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-util-decode-numeric-character-reference
```
+In Deno with [`esm.sh`][esmsh]:
+
+```js
+import {decodeNumericCharacterReference} from 'https://esm.sh/micromark-util-decode-numeric-character-reference@1'
+```
+
+In browsers with [`esm.sh`][esmsh]:
+
+```html
+<script type="module">
+ import {decodeNumericCharacterReference} from 'https://esm.sh/micromark-util-decode-numeric-character-reference@1?bundle'
+</script>
+```
+
## Use
```js
@@ -19155,26 +19856,46 @@ decodeNumericCharacterReference('110000', 16) // '�' - Out of range
## API
-This module exports the following identifiers:
-`decodeNumericCharacterReference`.
+This module exports the identifier:
+[`decodeNumericCharacterReference`][api-decode-numeric-character-reference].
There is no default export.
-### `decodeNumericCharacterReference(value)`
+### `decodeNumericCharacterReference(value, base)`
+
+Turn the number (in string form as either hexa- or plain decimal) coming from
+a numeric character reference into a character.
-Sort of like `String.fromCharCode(Number.parseInt(value, base))`,
-but makes non-characters and control characters safe.
+Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes
+non-characters and control characters safe.
###### Parameters
-* `value` (`string`) — Value to decode.
-* `base` (`number`, probably `10` or `16`) — Numeric base.
+* `value` (`string`)
+ — value to decode
+* `base` (`number`, probably `10` or `16`)
+ — numeric base
###### Returns
-`string` — Character code.
+Character (`string`).
+
+## Types
+
+This package is fully typed with [TypeScript][].
+It exports no additional types.
+
+## Compatibility
+
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
+
+This package works with `micromark` version 3+.
## Security
+This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
@@ -19206,9 +19927,9 @@ abide by its terms.
[downloads]: https://www.npmjs.com/package/micromark-util-normalize-identifier
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-util-normalize-identifier.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-util-normalize-identifier
-[bundle-size]: https://bundlephobia.com/result?p=micromark-util-normalize-identifier
+[bundle-size]: https://bundlejs.com/?q=micromark-util-normalize-identifier
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -19218,6 +19939,10 @@ abide by its terms.
[npm]: https://docs.npmjs.com/cli/install
+[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
+
+[esmsh]: https://esm.sh
+
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
@@ -19228,19 +19953,25 @@ abide by its terms.
[health]: https://github.com/micromark/.github
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
+
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
+
+[support]: https://github.com/micromark/.github/blob/main/support.md
+
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[typescript]: https://www.typescriptlang.org
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[micromark]: https://github.com/micromark/micromark
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[api-decode-numeric-character-reference]: #decodenumericcharacterreferencevalue-base
-----------
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -19254,26 +19985,54 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-micromark utility to decode markdown strings.
+[micromark][] utility to decode markdown strings.
## Contents
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`decodeString(value)`](#decodestringvalue)
+* [Types](#types)
+* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
+## What is this?
+
+This package exposes an algorithm to parse character escapes and character
+references.
+
+## When should I use this?
+
+This package might be useful when you are making your own micromark extensions.
+
## Install
-[npm][]:
+This package is [ESM only][esm].
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-util-decode-string
```
+In Deno with [`esm.sh`][esmsh]:
+
+```js
+import {decodeString} from 'https://esm.sh/micromark-util-decode-string@1'
+```
+
+In browsers with [`esm.sh`][esmsh]:
+
+```html
+<script type="module">
+ import {decodeString} from 'https://esm.sh/micromark-util-decode-string@1?bundle'
+</script>
+```
+
## Use
```js
@@ -19286,26 +20045,43 @@ decodeString('a ; b') // 'a ; b'
## API
-This module exports the following identifiers: `decodeString`.
+This module exports the identifier [`decodeString`][api-decode-string].
There is no default export.
### `decodeString(value)`
-micromark utility to decode markdown strings (which occur in places such as
-fenced code info strings, destinations, labels, and titles).
+Decode markdown strings (which occur in places such as fenced code info strings,
+destinations, labels, and titles).
+
The “string” content type allows character escapes and -references.
This decodes those.
###### Parameters
-* `value` (`string`) — Value to decode.
+* `value` (`string`)
+ — value to decode
###### Returns
-`string` — Decoded value.
+Decoded value (`string`).
+
+## Types
+
+This package is fully typed with [TypeScript][].
+It exports no additional types.
+
+## Compatibility
+
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
+
+This package works with `micromark` version 3+.
## Security
+This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
@@ -19337,9 +20113,9 @@ abide by its terms.
[downloads]: https://www.npmjs.com/package/micromark-util-normalize-identifier
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-util-normalize-identifier.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-util-normalize-identifier
-[bundle-size]: https://bundlephobia.com/result?p=micromark-util-normalize-identifier
+[bundle-size]: https://bundlejs.com/?q=micromark-util-normalize-identifier
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -19349,6 +20125,10 @@ abide by its terms.
[npm]: https://docs.npmjs.com/cli/install
+[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
+
+[esmsh]: https://esm.sh
+
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
@@ -19359,19 +20139,25 @@ abide by its terms.
[health]: https://github.com/micromark/.github
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[support]: https://github.com/micromark/.github/blob/main/support.md
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
+
+[typescript]: https://www.typescriptlang.org
+
+[micromark]: https://github.com/micromark/micromark
+
+[api-decode-string]: #decodestringvalue
-----------
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -19385,26 +20171,53 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-micromark utility to encode dangerous html characters.
+[micromark][] utility to encode dangerous html characters.
## Contents
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`encode(value)`](#encodevalue)
+* [Types](#types)
+* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
+## What is this?
+
+This package exposes an algorithm to make text safe for embedding in HTML.
+
+## When should I use this?
+
+This package might be useful when you are making your own micromark extensions.
+
## Install
-[npm][]:
+This package is [ESM only][esm].
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-util-encode
```
+In Deno with [`esm.sh`][esmsh]:
+
+```js
+import {encode} from 'https://esm.sh/micromark-util-encode@1'
+```
+
+In browsers with [`esm.sh`][esmsh]:
+
+```html
+<script type="module">
+ import {encode} from 'https://esm.sh/micromark-util-encode@1?bundle'
+</script>
+```
+
## Use
```js
@@ -19415,7 +20228,7 @@ encode('<3') // '&lt;3'
## API
-This module exports the following identifiers: `encode`.
+This module exports the identifier [`encode`][api-encode].
There is no default export.
### `encode(value)`
@@ -19428,14 +20241,30 @@ Technically, we can skip `>` and `"` in many cases, but CM includes them.
###### Parameters
-* `value` (`string`) — Value to encode.
+* `value` (`string`)
+ — value to encode
###### Returns
-`string` — Encoded value.
+Encoded value (`string`).
+
+## Types
+
+This package is fully typed with [TypeScript][].
+It exports no additional types.
+
+## Compatibility
+
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
+
+This package works with `micromark` version 3+.
## Security
+This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
@@ -19467,9 +20296,9 @@ abide by its terms.
[downloads]: https://www.npmjs.com/package/micromark-util-encode
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-util-encode.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-util-encode
-[bundle-size]: https://bundlephobia.com/result?p=micromark-util-encode
+[bundle-size]: https://bundlejs.com/?q=micromark-util-encode
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -19479,6 +20308,10 @@ abide by its terms.
[npm]: https://docs.npmjs.com/cli/install
+[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
+
+[esmsh]: https://esm.sh
+
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
@@ -19489,19 +20322,25 @@ abide by its terms.
[health]: https://github.com/micromark/.github
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
+
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
+
+[support]: https://github.com/micromark/.github/blob/main/support.md
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[typescript]: https://www.typescriptlang.org
+
+[micromark]: https://github.com/micromark/micromark
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[api-encode]: #encodevalue
-----------
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -19515,23 +20354,35 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-micromark utility with list of html tag names.
+[micromark][] utility with list of html tag names.
## Contents
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`htmlBlockNames`](#htmlblocknames)
* [`htmlRawNames`](#htmlrawnames)
+* [Types](#types)
+* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
+## What is this?
+
+This package exposes a list of known tag names to markdown.
+
+## When should I use this?
+
+This package is only useful if you want to build an alternative to micromark.
+
## Install
This package is [ESM only][esm].
-In Node.js (version 12.20+, 14.14+, 16.0+, 18.0+), install with [npm][]:
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-util-html-tag-name
@@ -19562,33 +20413,56 @@ console.log(htmlRawNames) // ['pre', 'script', …]
## API
-This module exports the following identifiers: `htmlBlockNames`,
-`htmlRawNames`.
+This module exports the identifiers [`htmlBlockNames`][api-html-block-names]
+and [`htmlRawNames`][api-html-raw-names].
There is no default export.
### `htmlBlockNames`
-List of lowercase HTML tag names (`Array<string>`) which when parsing HTML
-(flow), result in more relaxed rules (condition 6): because they are known
-blocks, the HTML-like syntax doesn’t have to be strictly parsed.
+List of lowercase HTML “block” tag names (`Array<string>`).
+
+The list, when parsing HTML (flow), results in more relaxed rules (condition
+6\).
+Because they are known blocks, the HTML-like syntax doesn’t have to be strictly
+parsed.
For tag names not in this list, a more strict algorithm (condition 7) is used
to detect whether the HTML-like syntax is seen as HTML (flow) or not.
-This is copied from: <https://spec.commonmark.org/0.30/#html-blocks>.
+This is copied from:
+<https://spec.commonmark.org/0.30/#html-blocks>.
+
+> 👉 **Note**: `search` was added in `[email protected]`.
### `htmlRawNames`
-List of lowercase HTML tag names (`Array<string>`) which when parsing HTML
-(flow), result in HTML that can include lines w/o exiting, until a closing tag
-also in this list is found (condition 1).
+List of lowercase HTML “raw” tag names (`Array<string>`).
-This is copied from:
+The list, when parsing HTML (flow), results in HTML that can include lines
+without exiting, until a closing tag also in this list is found (condition
+1\).
+
+This module is copied from:
<https://spec.commonmark.org/0.30/#html-blocks>.
-Note that `textarea` was added in `[email protected]`.
+> 👉 **Note**: `textarea` was added in `[email protected]`.
+
+## Types
+
+This package is fully typed with [TypeScript][].
+It exports no additional types.
+
+## Compatibility
+
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
+
+This package works with `micromark` version 3+.
## Security
+This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
@@ -19620,9 +20494,9 @@ abide by its terms.
[downloads]: https://www.npmjs.com/package/micromark-util-html-tag-name
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-util-html-tag-name.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-util-html-tag-name
-[bundle-size]: https://bundlephobia.com/result?p=micromark-util-html-tag-name
+[bundle-size]: https://bundlejs.com/?q=micromark-util-html-tag-name
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -19646,19 +20520,27 @@ abide by its terms.
[health]: https://github.com/micromark/.github
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
+
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
+
+[support]: https://github.com/micromark/.github/blob/main/support.md
+
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[typescript]: https://www.typescriptlang.org
+
+[micromark]: https://github.com/micromark/micromark
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[api-html-block-names]: #htmlblocknames
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[api-html-raw-names]: #htmlrawnames
-----------
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -19672,26 +20554,53 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-micromark utility normalize identifiers (as found in references, definitions).
+[micromark][] utility normalize identifiers.
## Contents
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`normalizeIdentifier(value)`](#normalizeidentifiervalue)
+* [Types](#types)
+* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
+## What is this?
+
+This package exposes an algorithm to normalize identifiers found in markdown.
+
+## When should I use this?
+
+This package might be useful when you are making your own micromark extensions.
+
## Install
-[npm][]:
+This package is [ESM only][esm].
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-util-normalize-identifier
```
+In Deno with [`esm.sh`][esmsh]:
+
+```js
+import {normalizeIdentifier} from 'https://esm.sh/micromark-util-normalize-identifier@1'
+```
+
+In browsers with [`esm.sh`][esmsh]:
+
+```html
+<script type="module">
+ import {normalizeIdentifier} from 'https://esm.sh/micromark-util-normalize-identifier@1?bundle'
+</script>
+```
+
## Use
```js
@@ -19705,32 +20614,51 @@ normalizeIdentifier('Толпой') // 'ТОЛПОЙ'
## API
-This module exports the following identifiers: `normalizeIdentifier`.
+This module exports the identifier
+[`normalizeIdentifier`][api-normalize-identifier].
There is no default export.
### `normalizeIdentifier(value)`
-Normalize an identifier (such as used in definitions).
-Collapse Markdown whitespace, trim, and then lower- and uppercase.
+Normalize an identifier (as found in references, definitions).
+
+Collapses markdown whitespace, trim, and then lower- and uppercase.
Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their
lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different
uppercase character (U+0398 (`Θ`)).
-Hence, to get that form, we perform both lower- and uppercase.
+So, to get a canonical form, we perform both lower- and uppercase.
-Using uppercase last makes sure keys will not interact with default prototypal
-methods: no method is uppercase.
+Using uppercase last makes sure keys will never interact with default
+prototypal values (such as `constructor`): nothing in the prototype of `Object`
+is uppercase.
###### Parameters
-* `value` (`string`) — Identifier to normalize.
+* `value` (`string`)
+ — identifier to normalize
###### Returns
-`string` — Normalized value.
+Normalized identifier (`string`).
+
+## Types
+
+This package is fully typed with [TypeScript][].
+It exports no additional types.
+
+## Compatibility
+
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
+
+This package works with `micromark` version 3+.
## Security
+This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
@@ -19762,9 +20690,9 @@ abide by its terms.
[downloads]: https://www.npmjs.com/package/micromark-util-normalize-identifier
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-util-normalize-identifier.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-util-normalize-identifier
-[bundle-size]: https://bundlephobia.com/result?p=micromark-util-normalize-identifier
+[bundle-size]: https://bundlejs.com/?q=micromark-util-normalize-identifier
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -19774,6 +20702,10 @@ abide by its terms.
[npm]: https://docs.npmjs.com/cli/install
+[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
+
+[esmsh]: https://esm.sh
+
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
@@ -19784,19 +20716,25 @@ abide by its terms.
[health]: https://github.com/micromark/.github
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
+
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
+
+[support]: https://github.com/micromark/.github/blob/main/support.md
+
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[typescript]: https://www.typescriptlang.org
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[micromark]: https://github.com/micromark/micromark
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[api-normalize-identifier]: #normalizeidentifiervalue
-----------
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -19810,7 +20748,7 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-micromark utility to resolve subtokens.
+[micromark][] utility to resolve subtokens.
[Resolvers][resolver] are functions that take events and manipulate them.
This is needed for example because media (links, images) and attention (strong,
@@ -19822,22 +20760,49 @@ when one closing matches an opening, too.
## Contents
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`resolveAll(constructs, events, context)`](#resolveallconstructs-events-context)
+* [Types](#types)
+* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
+## What is this?
+
+This package exposes a micromark internal that you probably don’t need.
+
+## When should I use this?
+
+This package might be useful when you are making your own micromark extensions.
+
## Install
-[npm][]:
+This package is [ESM only][esm].
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-util-resolve-all
```
+In Deno with [`esm.sh`][esmsh]:
+
+```js
+import {resolveAll} from 'https://esm.sh/micromark-util-resolve-all@1'
+```
+
+In browsers with [`esm.sh`][esmsh]:
+
+```html
+<script type="module">
+ import {resolveAll} from 'https://esm.sh/micromark-util-resolve-all@1?bundle'
+</script>
+```
+
## Use
```js
@@ -19900,7 +20865,7 @@ function resolveAllAttention(events, context) {
## API
-This module exports the following identifiers: `resolveAll`.
+This module exports the identifier [`resolveAll`][api-resolve-all].
There is no default export.
### `resolveAll(constructs, events, context)`
@@ -19909,23 +20874,40 @@ Call all `resolveAll`s in `constructs`.
###### Parameters
-* `constructs` (`Construct[]`) — List of constructs, optionally with
- `resolveAll`s
-* `events` (`Event[]`) — List of events
-* `context` (`TokenizeContext`) — Context used by `tokenize`
+* `constructs` (`Array<Construct>`)
+ — list of constructs, optionally with `resolveAll`s
+* `events` (`Array<Event>`)
+ — list of events
+* `context` (`TokenizeContext`)
+ — context used by `tokenize`
###### Returns
-`Events[]` — Changed events.
+Changed events (`Array<Events>`).
-## Security
+## Types
-See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
-submit a security report.
+This package is fully typed with [TypeScript][].
+It exports no additional types.
-## Contribute
+## Compatibility
-See [`contributing.md`][contributing] in [`micromark/.github`][health] for ways
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
+
+This package works with `micromark` version 3+.
+
+## Security
+
+This package is safe.
+See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
+submit a security report.
+
+## Contribute
+
+See [`contributing.md`][contributing] in [`micromark/.github`][health] for ways
to get started.
See [`support.md`][support] for ways to get help.
@@ -19951,9 +20933,9 @@ abide by its terms.
[downloads]: https://www.npmjs.com/package/micromark-util-resolve-all
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-util-resolve-all.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-util-resolve-all
-[bundle-size]: https://bundlephobia.com/result?p=micromark-util-resolve-all
+[bundle-size]: https://bundlejs.com/?q=micromark-util-resolve-all
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -19963,6 +20945,10 @@ abide by its terms.
[npm]: https://docs.npmjs.com/cli/install
+[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
+
+[esmsh]: https://esm.sh
+
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
@@ -19973,21 +20959,27 @@ abide by its terms.
[health]: https://github.com/micromark/.github
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[support]: https://github.com/micromark/.github/blob/main/support.md
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
[resolver]: https://github.com/micromark/micromark/blob/a571c09/packages/micromark-util-types/index.js#L219
+[typescript]: https://www.typescriptlang.org
+
+[micromark]: https://github.com/micromark/micromark
+
+[api-resolve-all]: #resolveallconstructs-events-context
+
-----------
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -20001,23 +20993,35 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-micromark utility to sanitize urls.
+[micromark][] utility to sanitize urls.
## Contents
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
+ * [`normalizeUri(value)`](#normalizeurivalue)
* [`sanitizeUri(url[, pattern])`](#sanitizeuriurl-pattern)
- * [`normalizeUri(url[, pattern])`](#normalizeuriurl-pattern)
+* [Types](#types)
+* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
+## What is this?
+
+This package exposes an algorithm to make URLs safe.
+
+## When should I use this?
+
+This package might be useful when you are making your own micromark extensions.
+
## Install
This package is [ESM only][esm].
-In Node.js (version 12.20+, 14.14+, 16.0+, 18.0+), install with [npm][]:
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-util-sanitize-uri
@@ -20054,17 +21058,34 @@ sanitizeUri('#a', /^https?$/i) // '#a'
## API
-This module exports the following identifiers: `sanitizeUri`.
+This module exports the identifiers [`normalizeUri`][api-normalize-uri] and
+[`sanitizeUri`][api-sanitize-uri].
There is no default export.
+### `normalizeUri(value)`
+
+Normalize a URL.
+
+Encode unsafe characters with percent-encoding, skipping already encoded
+sequences.
+
+###### Parameters
+
+* `value` (`string`)
+ — URI to normalize
+
+###### Returns
+
+Normalized URI (`string`).
+
### `sanitizeUri(url[, pattern])`
Make a value safe for injection as a URL.
This encodes unsafe characters with percent-encoding and skips already
-encoded sequences (see `normalizeUri` internally).
+encoded sequences (see [`normalizeUri`][api-normalize-uri]).
Further unsafe characters are encoded as character references (see
-`micromark-util-encode`).
+[`micromark-util-encode`][micromark-util-encode]).
A regex of allowed protocols can be given, in which case the URL is sanitized.
For example, `/^(https?|ircs?|mailto|xmpp)$/i` can be used for `a[href]`, or
@@ -20074,30 +21095,32 @@ as a dangerous example, `javascript:`), the value is ignored.
###### Parameters
-* `url` (`string`) — URI to sanitize.
-* `pattern` (`RegExp`, optional) — Allowed protocols.
+* `url` (`string`)
+ — URI to sanitize
+* `pattern` (`RegExp`, optional)
+ — allowed protocols
###### Returns
-`string` — Sanitized URI.
+Sanitized URI (`string`).
-### `normalizeUri(url[, pattern])`
-
-Normalize a URL (such as used in definitions).
-
-Encode unsafe characters with percent-encoding, skipping already encoded
-sequences.
+## Types
-###### Parameters
+This package is fully typed with [TypeScript][].
+It exports no additional types.
-* `url` (`string`) — URI to normalize.
+## Compatibility
-###### Returns
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
-`string` — Normalized URI.
+This package works with `micromark` version 3+.
## Security
+This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
@@ -20129,9 +21152,9 @@ abide by its terms.
[downloads]: https://www.npmjs.com/package/micromark-util-sanitize-uri
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-util-sanitize-uri.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-util-sanitize-uri
-[bundle-size]: https://bundlephobia.com/result?p=micromark-util-sanitize-uri
+[bundle-size]: https://bundlejs.com/?q=micromark-util-sanitize-uri
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -20155,19 +21178,29 @@ abide by its terms.
[health]: https://github.com/micromark/.github
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
+
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[support]: https://github.com/micromark/.github/blob/main/support.md
+
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
+
+[typescript]: https://www.typescriptlang.org
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[micromark]: https://github.com/micromark/micromark
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[micromark-util-encode]: https://github.com/micromark/micromark/tree/main/packages/micromark-util-encode
+
+[api-normalize-uri]: #normalizeurivalue
+
+[api-sanitize-uri]: #sanitizeuriurl-pattern
-----------
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -20181,26 +21214,53 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-micromark utility to tokenize subtokens.
+[micromark][] utility to tokenize subtokens.
## Contents
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`subtokenize(events)`](#subtokenizeevents)
+* [Types](#types)
+* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
+## What is this?
+
+This package exposes a micromark internal that you probably don’t need.
+
+## When should I use this?
+
+This package might be useful when you are making your own micromark extensions.
+
## Install
-[npm][]:
+This package is [ESM only][esm].
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-util-subtokenize
```
+In Deno with [`esm.sh`][esmsh]:
+
+```js
+import {subtokenize} from 'https://esm.sh/micromark-util-subtokenize@1'
+```
+
+In browsers with [`esm.sh`][esmsh]:
+
+```html
+<script type="module">
+ import {subtokenize} from 'https://esm.sh/micromark-util-subtokenize@1?bundle'
+</script>
+```
+
## Use
```js
@@ -20220,7 +21280,7 @@ function resolveContent(events) {
## API
-This module exports the following identifiers: `subtokenize`.
+This module exports the identifiers [`subtokenize`][api-subtokenize].
There is no default export.
### `subtokenize(events)`
@@ -20229,14 +21289,30 @@ Tokenize subcontent.
###### Parameters
-* `events` (`Event[]`) — List of events
+* `events` (`Array<Event>`)
+ — list of events
###### Returns
-`boolean` — Whether subtokens were found.
+Whether subtokens were found (`boolean`).
+
+## Types
+
+This package is fully typed with [TypeScript][].
+It exports no additional types.
+
+## Compatibility
+
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
+
+This package works with `micromark` version 3+.
## Security
+This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
@@ -20268,9 +21344,9 @@ abide by its terms.
[downloads]: https://www.npmjs.com/package/micromark-util-subtokenize
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-util-subtokenize.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-util-subtokenize
-[bundle-size]: https://bundlephobia.com/result?p=micromark-util-subtokenize
+[bundle-size]: https://bundlejs.com/?q=micromark-util-subtokenize
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -20280,6 +21356,10 @@ abide by its terms.
[npm]: https://docs.npmjs.com/cli/install
+[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
+
+[esmsh]: https://esm.sh
+
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
@@ -20290,19 +21370,25 @@ abide by its terms.
[health]: https://github.com/micromark/.github
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[support]: https://github.com/micromark/.github/blob/main/support.md
+
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
+
+[typescript]: https://www.typescriptlang.org
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[micromark]: https://github.com/micromark/micromark
+
+[api-subtokenize]: #subtokenizeevents
-----------
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -20316,28 +21402,55 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-micromark utility with symbols.
-
-It’s useful to reference these by name instead of value while developing.
-[`micromark-build`][micromark-build] compiles them away for production code.
+[micromark][] utility with symbols.
## Contents
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
+* [Types](#types)
+* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
+## What is this?
+
+This package exposes constants used throughout the micromark ecosystem.
+
+## When should I use this?
+
+This package is useful when you are making your own micromark extensions.
+It’s useful to reference these constants by name instead of value while
+developing.
+[`micromark-build`][micromark-build] compiles them away for production code.
+
## Install
-[npm][]:
+This package is [ESM only][esm].
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-util-symbol
```
+In Deno with [`esm.sh`][esmsh]:
+
+```js
+import {codes} from 'https://esm.sh/micromark-util-symbol/codes@1'
+```
+
+In browsers with [`esm.sh`][esmsh]:
+
+```html
+<script type="module">
+ import {codes} from 'https://esm.sh/micromark-util-symbol/codes@1?bundle'
+</script>
+```
+
## Use
```js
@@ -20362,10 +21475,25 @@ Each module exports an identifier with the same name (for example,
`micromark-util-symbol/codes` has `codes`), which is an object mapping strings
to other values.
-Take a peek at the code to learn more!
+See the code for the exposed data.
+
+## Types
+
+This package is fully typed with [TypeScript][].
+It exports no additional types.
+
+## Compatibility
+
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
+
+This package works with `micromark` version 3+.
## Security
+This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
@@ -20397,9 +21525,9 @@ abide by its terms.
[downloads]: https://www.npmjs.com/package/micromark-util-symbol
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-util-symbol.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-util-symbol
-[bundle-size]: https://bundlephobia.com/result?p=micromark-util-symbol
+[bundle-size]: https://bundlejs.com/?q=micromark-util-symbol
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -20409,6 +21537,10 @@ abide by its terms.
[npm]: https://docs.npmjs.com/cli/install
+[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
+
+[esmsh]: https://esm.sh
+
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
@@ -20419,13 +21551,17 @@ abide by its terms.
[health]: https://github.com/micromark/.github
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
+
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
+
+[support]: https://github.com/micromark/.github/blob/main/support.md
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[typescript]: https://www.typescriptlang.org
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[micromark]: https://github.com/micromark/micromark
[micromark-build]: https://github.com/micromark/micromark/tree/main/packages/micromark-build
@@ -20433,7 +21569,7 @@ abide by its terms.
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -20447,25 +21583,45 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-micromark utility with a couple of typescript types.
+[micromark][] utility package with TypeScript types.
## Contents
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
+* [Types](#types)
+* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
+## What is this?
+
+This package exposes TypeScript types shared throughout the micromark
+ecosystem.
+
+## When should I use this?
+
+This package is useful when you are making your own, typed, micromark
+extensions.
+
## Install
-[npm][]:
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-util-types
```
+In Deno with [`esm.sh`][esmsh]:
+
+```js
+import type {Point, /* … */} from 'https://esm.sh/micromark-util-types@1'
+```
+
## Use
```js
@@ -20479,12 +21635,25 @@ npm install micromark-util-types
This module exports no identifiers.
There is no default export.
-See
-[the code](https://github.com/micromark/micromark/blob/main/packages/micromark-util-types/index.js)
-for all about the exposed types.
+See [the code][code] for all about the exposed types.
+
+## Types
+
+This package is just [TypeScript][] types.
+It exports lots of different types.
+
+## Compatibility
+
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
+
+This package work with `micromark` version 3+.
## Security
+This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
@@ -20516,9 +21685,9 @@ abide by its terms.
[downloads]: https://www.npmjs.com/package/micromark-util-encode
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-util-encode.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-util-encode
-[bundle-size]: https://bundlephobia.com/result?p=micromark-util-encode
+[bundle-size]: https://bundlejs.com/?q=micromark-util-encode
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -20528,6 +21697,8 @@ abide by its terms.
[npm]: https://docs.npmjs.com/cli/install
+[esmsh]: https://esm.sh
+
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
@@ -20538,25 +21709,29 @@ abide by its terms.
[health]: https://github.com/micromark/.github
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
+
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
+
+[support]: https://github.com/micromark/.github/blob/main/support.md
+
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[typescript]: https://www.typescriptlang.org
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[micromark]: https://github.com/micromark/micromark
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[code]: https://github.com/micromark/micromark/blob/main/packages/micromark-util-types/index.d.ts
-----------
The following NPM package may be included in this product:
This package contains the following license and notice below:
-<h1 align="center">
- <img src="https://raw.githubusercontent.com/micromark/micromark/2e476c9/logo.svg?sanitize=true" alt="micromark" />
-</h1>
+# micromark
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
@@ -20566,84 +21741,82 @@ This package contains the following license and notice below:
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
-The smallest CommonMark compliant markdown parser with positional info and
-concrete tokens.
+Markdown parser.
+
+> **Note**: this is the `micromark` package from the micromark monorepo.
+> See the [monorepo readme][micromark] for more on the project.
+> See this readme for how to use it.
## Feature highlights
+<!-- Note: this section has to be in sync with the monorepo readme. -->
+
* [x] **[compliant][commonmark]** (100% to CommonMark)
-* [x] **[extensions][]** ([GFM][], [directives][], [frontmatter][], [math][],
- [MDX.js][mdxjs])
+* [x] **[extensions][]** (100% [GFM][], 100% [MDX.js][mdxjs], [directives][],
+ [frontmatter][], [math][])
* [x] **[safe][security]** (by default)
-* [x] **[small][size]** (smallest CM parser that exists)
-* [x] **[robust][test]** (1800+ tests, 100% coverage, fuzz testing)
+* [x] **[robust][test]** (±2k tests, 100% coverage, fuzz testing)
+* [x] **[small][size-debug]** (smallest CM parser at ±15kb)
-## When to use this
+## Contents
+
+* [When should I use this?](#when-should-i-use-this)
+* [What is this?](#what-is-this)
+* [Install](#install)
+* [Use](#use)
+* [API](#api)
+ * [`micromark(value[, encoding][, options])`](#micromarkvalue-encoding-options)
+ * [`stream(options?)`](#streamoptions)
+ * [`Options`](#options)
+* [Types](#types)
+* [Compatibility](#compatibility)
+* [Security](#security)
+* [Contribute](#contribute)
+* [Sponsor](#sponsor)
+* [License](#license)
+
+## When should I use this?
+
+<!-- Note: this section has to be in sync with the monorepo readme. -->
* If you *just* want to turn markdown into HTML (with maybe a few extensions)
* If you want to do *really complex things* with markdown
See [§ Comparison][comparison] for more info
-## Intro
+## What is this?
+
+<!-- Note: this section has to be in sync with the monorepo readme. -->
+
+`micromark` is an open source markdown parser written in JavaScript.
+It’s implemented as a state machine that emits concrete tokens, so that every
+byte is accounted for, with positional info.
+It then compiles those tokens directly to HTML, but other tools can take the
+data and for example build an AST which is easier to work with
+([`mdast-util-to-markdown`][mdast-util-to-markdown]).
-micromark is a long awaited markdown parser.
-It uses a [state machine][cmsm] to parse the entirety of markdown into concrete
-tokens.
-It’s the smallest 100% [CommonMark][] compliant markdown parser in JavaScript.
-It was made to replace the internals of [`remark-parse`][remark-parse], the most
-[popular][] markdown parser.
-Its API compiles to HTML, but its parts are made to be used separately, so as to
-generate syntax trees ([`mdast-util-from-markdown`][from-markdown]) or compile
-to other output formats.
+While most markdown parsers work towards compliancy with CommonMark (or GFM),
+this project goes further by following how the reference parsers (`cmark`,
+`cmark-gfm`) work, which is confirmed with thousands of extra tests.
+
+Other than CommonMark and GFM, micromark also supports common extensions to
+markdown such as MDX, math, and frontmatter.
+
+These npm packages have a sibling project in Rust:
+[`markdown-rs`][markdown-rs].
* to learn markdown, see this [cheatsheet and tutorial][cheat]
* for more about us, see [`unifiedjs.com`][site]
* for updates, see [Twitter][]
* for questions, see [Discussions][chat]
-* to help, see [contribute][] or [sponsor][] below
-
-## Contents
-
-* [Install](#install)
-* [Use](#use)
-* [API](#api)
- * [`micromark(value[, encoding][, options])`](#micromarkvalue-encoding-options)
- * [`stream(options?)`](#streamoptions)
-* [Extensions](#extensions)
- * [List of extensions](#list-of-extensions)
- * [`SyntaxExtension`](#syntaxextension)
- * [`HtmlExtension`](#htmlextension)
- * [Extending markdown](#extending-markdown)
- * [Creating a micromark extension](#creating-a-micromark-extension)
-* [Architecture](#architecture)
- * [Overview](#overview)
- * [Preprocess](#preprocess)
- * [Parse](#parse)
- * [Postprocess](#postprocess)
- * [Compile](#compile)
-* [Examples](#examples)
- * [GitHub flavored markdown (GFM)](#github-flavored-markdown-gfm)
- * [Math](#math)
- * [Syntax tree](#syntax-tree)
-* [Markdown](#markdown)
- * [CommonMark](#commonmark)
- * [Grammar](#grammar)
-* [Project](#project)
- * [Comparison](#comparison)
- * [Test](#test)
- * [Size & debug](#size--debug)
- * [Version](#version)
- * [Security](#security)
- * [Contribute](#contribute)
- * [Sponsor](#sponsor)
- * [Origin story](#origin-story)
- * [License](#license)
+* to help, see [contribute][] and [sponsor][] below
## Install
+<!-- Note: this section has to be in sync with the monorepo readme. -->
+
This package is [ESM only][esm].
-In Node.js (version 12.20+, 14.14+, 16.0+, 18.0+), install with [npm][]:
+In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark
@@ -20665,6 +21838,8 @@ In browsers with [`esm.sh`][esmsh]:
## Use
+<!-- Note: this section has to be in sync with the monorepo readme. -->
+
Typical use (buffering):
```js
@@ -20706,10 +21881,10 @@ Yields:
Streaming interface:
```js
-import fs from 'fs'
+import {createReadStream} from 'node:fs'
import {stream} from 'micromark/stream'
-fs.createReadStream('example.md')
+createReadStream('example.md')
.on('error', handleError)
.pipe(stream())
.pipe(process.stdout)
@@ -20725,1277 +21900,130 @@ function handleError(error) {
`micromark` core has two entries in its export map: `micromark` and
`micromark/stream`.
-`micromark` exports the following identifier: `micromark`.
-`micromark/stream` exports the following identifier: `stream`.
+`micromark` exports the identifier [`micromark`][api-micromark].
+`micromark/stream` exports the identifier [`stream`][api-stream].
There are no default exports.
-The export map supports the endorsed
-[`development` condition](https://nodejs.org/api/packages.html#packages_resolving_user_conditions).
+The export map supports the [`development` condition][development].
Run `node --conditions development module.js` to get instrumented dev code.
Without this condition, production code is loaded.
-See [§ Size & debug][size-debug] for more info.
-
-### `micromark(value[, encoding][, options])`
-
-Compile markdown to HTML.
-
-##### Parameters
-
-###### `value`
-
-Markdown to parse (`string` or `Buffer`).
-
-###### `encoding`
-
-[Character encoding][encoding] to understand `value` as when it’s a
-[`Buffer`][buffer] (`string`, default: `'utf8'`).
-
-###### `options.defaultLineEnding`
-
-Value to use for line endings not in `value` (`string`, default: first line
-ending or `'\n'`).
-
-Generally, micromark copies line endings (`'\r'`, `'\n'`, `'\r\n'`) in the
-markdown document over to the compiled HTML.
-In some cases, such as `> a`, CommonMark requires that extra line endings are
-added: `<blockquote>\n<p>a</p>\n</blockquote>`.
-
-###### `options.allowDangerousHtml`
-
-Whether to allow embedded HTML (`boolean`, default: `false`).
-See [§ Security][security].
-
-###### `options.allowDangerousProtocol`
-
-Whether to allow potentially dangerous protocols in links and images (`boolean`,
-default: `false`).
-URLs relative to the current protocol are always allowed (such as, `image.jpg`).
-For links, the allowed protocols are `http`, `https`, `irc`, `ircs`, `mailto`,
-and `xmpp`.
-For images, the allowed protocols are `http` and `https`.
-See [§ Security][security].
-
-###### `options.extensions`
-
-Array of syntax extensions ([`Array<SyntaxExtension>`][syntax-extension],
-default: `[]`).
-See [§ Extensions][extensions].
-
-###### `options.htmlExtensions`
-
-Array of HTML extensions ([`Array<HtmlExtension>`][html-extension], default:
-`[]`).
-See [§ Extensions][extensions].
-
-##### Returns
-
-`string` — Compiled HTML.
-
-### `stream(options?)`
-
-Streaming interface of micromark.
-Compiles markdown to HTML.
-`options` are the same as the buffering API above.
-Note that some of the work to parse markdown can be done streaming, but in the
-end buffering is required.
-
-micromark does not handle errors for you, so you must handle errors on whatever
-streams you pipe into it.
-As markdown does not know errors, `micromark` itself does not emit errors.
-
-## Extensions
-
-micromark supports extensions.
-There are two types of extensions for micromark:
-[`SyntaxExtension`][syntax-extension],
-which change how markdown is parsed, and [`HtmlExtension`][html-extension],
-which change how it compiles.
-They can be passed in [`options.extensions`][option-extensions] or
-[`options.htmlExtensions`][option-htmlextensions], respectively.
-
-As a user of extensions, refer to each extension’s readme for more on how to use
-them.
-As a (potential) author of extensions, refer to
-[§ Extending markdown][extending-markdown] and
-[§ Creating a micromark extension][create-extension].
-
-### List of extensions
-
-* [`micromark/micromark-extension-directive`][directives]
- — support directives (generic extensions)
-* [`micromark/micromark-extension-frontmatter`][frontmatter]
- — support frontmatter (YAML, TOML, etc)
-* [`micromark/micromark-extension-gfm`][gfm]
- — support GFM (GitHub Flavored Markdown)
-* [`micromark/micromark-extension-gfm-autolink-literal`](https://github.com/micromark/micromark-extension-gfm-autolink-literal)
- — support GFM autolink literals
-* [`micromark/micromark-extension-gfm-footnote`](https://github.com/micromark/micromark-extension-gfm-footnote)
- — support GFM footnotes
-* [`micromark/micromark-extension-gfm-strikethrough`](https://github.com/micromark/micromark-extension-gfm-strikethrough)
- — support GFM strikethrough
-* [`micromark/micromark-extension-gfm-table`](https://github.com/micromark/micromark-extension-gfm-table)
- — support GFM tables
-* [`micromark/micromark-extension-gfm-tagfilter`](https://github.com/micromark/micromark-extension-gfm-tagfilter)
- — support GFM tagfilter
-* [`micromark/micromark-extension-gfm-task-list-item`](https://github.com/micromark/micromark-extension-gfm-task-list-item)
- — support GFM tasklists
-* [`micromark/micromark-extension-math`][math]
- — support math
-* [`micromark/micromark-extension-mdx`](https://github.com/micromark/micromark-extension-mdx)
- — support MDX
-* [`micromark/micromark-extension-mdxjs`][mdxjs]
- — support MDX.js
-* [`micromark/micromark-extension-mdx-expression`](https://github.com/micromark/micromark-extension-mdx-expression)
- — support MDX (or MDX.js) expressions
-* [`micromark/micromark-extension-mdx-jsx`](https://github.com/micromark/micromark-extension-mdx-jsx)
- — support MDX (or MDX.js) JSX
-* [`micromark/micromark-extension-mdx-md`](https://github.com/micromark/micromark-extension-mdx-md)
- — support misc MDX changes
-* [`micromark/micromark-extension-mdxjs-esm`](https://github.com/micromark/micromark-extension-mdxjs-esm)
- — support MDX.js import/exports
-
-#### Community extensions
-
-* [`wataru-chocola/micromark-extension-definition-list`](https://github.com/wataru-chocola/micromark-extension-definition-list)
- — support definition lists
-
-### `SyntaxExtension`
-
-A syntax extension is an object whose fields are typically the names of hooks,
-referring to where constructs “hook” into.
-The fields at such objects are character codes, mapping to constructs as values.
-
-The built in [constructs][] are an example.
-See it and [existing extensions][extensions] for inspiration.
-
-### `HtmlExtension`
-
-An HTML extension is an object whose fields are typically `enter` or `exit`
-(reflecting whether a token is entered or exited).
-The values at such objects are names of tokens mapping to handlers.
-
-See [existing extensions][extensions] for inspiration.
-
-### Extending markdown
-
-micromark lets you change markdown syntax, yes, but there are alternatives.
-The alternatives are often better.
-
-Over the years, many micromark and remark users have asked about their unique
-goals for markdown.
-Some exemplary goals are:
-
-1. I want to add `rel="nofollow"` to external links
-2. I want to add links from headings to themselves
-3. I want line breaks in paragraphs to become hard breaks
-4. I want to support embedded music sheets
-5. I want authors to add arbitrary attributes
-6. I want authors to mark certain blocks with meaning, such as tip, warning,
- etc
-7. I want to combine markdown with JS(X)
-8. I want to support our legacy flavor of markdown-like syntax
-
-These can be solved in different ways and which solution is best is both
-subjective and dependant on unique needs.
-Often, there is already a solution in the form of an existing remark or rehype
-plugin.
-Respectively, their solutions are:
-
-1. [`remark-external-links`](https://github.com/remarkjs/remark-external-links)
-2. [`rehype-autolink-headings`](https://github.com/rehypejs/rehype-autolink-headings)
-3. [`remark-breaks`](https://github.com/remarkjs/remark-breaks)
-4. custom plugin similar to
- [`rehype-katex`](https://github.com/remarkjs/remark-math/tree/main/packages/rehype-katex)
- but integrating [`abcjs`](https://www.abcjs.net)
-5. either [`remark-directive`](https://github.com/remarkjs/remark-directive)
- and a custom plugin or with
- [`rehype-attr`](https://github.com/jaywcjlove/rehype-attr)
-6. [`remark-directive`](https://github.com/remarkjs/remark-directive)
- combined with a custom plugin
-7. combining the existing micromark MDX extensions however you please, such as
- done by [`mdx-js/mdx`](https://github.com/mdx-js/mdx) or
- [`xdm`](https://github.com/wooorm/xdm)
-8. Writing a micromark extension
-
-Looking at these from a higher level, they can be categorized:
-
-* **Changing the output by transforming syntax trees**
- (1 and 2)
-
- This category is nice as the format remains plain markdown that authors are
- already familiar with and which will work with existing tools and platforms.
-
- Implementations will deal with the syntax tree
- ([`mdast`][mdast]) and the ecosystems
- **[remark][]** and **[rehype][]**.
- There are many existing
- [utilities for working with that tree][utilities].
- Many [remark plugins][] and [rehype plugins][] also exist.
-* **Using and abusing markdown to add new meaning**
- (3, 4, potentially 5)
-
- This category is similar to *Changing the output by transforming syntax
- trees*, but adds a new meaning to certain things which already have
- semantics in markdown.
-
- Some examples in pseudo code:
-
- ````markdown
- * **A list item with the first paragraph bold**
-
- And then more content, is turned into `<dl>` / `<dt>` / `<dd>` elements
-
- Or, the title attributes on links or images is [overloaded](/url 'rel:nofollow')
- with a new meaning.
-
- ```csv
- fenced,code,can,include,data
- which,is,turned,into,a,graph
- ```
-
- ```js data can="be" passed=true
- // after the code language name
- ```
-
- HTML, especially comments, could be used as **markers**<!--id="markers"-->
- ````
-* **Arbitrary extension mechanism**
- (potentially 5; 6)
-
- This category is nice when content should contain embedded “components”.
- Often this means it’s required for authors to have some programming
- experience.
- There are three good ways to solve arbitrary extensions.
-
- **HTML**: Markdown already has an arbitrary extension syntax.
- It works in most places and authors are already familiar with the syntax,
- but it’s reasonably hard to implement securely.
- Certain platforms will remove HTML completely, others sanitize it to varying
- degrees.
- HTML also supports custom elements.
- These could be used and enhanced by client side JavaScript or enhanced when
- transforming the syntax tree.
-
- **Generic directives**: although
- [a proposal][directive-proposal]
- and not supported on most platforms, directives do work with many tools
- already.
- They’re not the easiest to author compared to, say, a heading, but sometimes
- that’s okay.
- They do have potential: they nicely solve the need for an infinite number of
- potential extensions to markdown in a single markdown-esque way.
-
- **MDX** also adds support for components by swapping HTML out for JS(X).
- JSX is an extension to JavaScript, so MDX is something along the lines of
- literate programming.
- This does require knowledge of React (or Vue) and JavaScript, excluding some
- authors.
-* **Extending markdown syntax**
- (7 and 8)
-
- Extend the syntax of markdown means:
-
- * Authors won’t be familiar with the syntax
- * Content won’t work in other places (such as on GitHub)
- * Defeating the purpose of markdown: being simple to author and looking
- like what it means
-
- …and it’s hard to do as it requires some in-depth knowledge of JavaScript
- and parsing.
- But it’s possible and in certain cases very powerful.
-
-### Creating a micromark extension
-
-This section shows how to create an extension for micromark that parses
-“variables” (a way to render some data) and one to turn a default construct off.
-
-> Stuck?
-> See [`support.md`][support].
-
-#### Prerequisites
-
-* You should possess an intermediate to high understanding of JavaScript:
- it’s going to get a bit complex
-* Read the readme of [unified][] (until you hit the API section) to better
- understand where micromark fits
-* Read the [§ Architecture][architecture] section to understand how micromark
- works
-* Read the [§ Extending markdown][extending-markdown] section to understand
- whether it’s a good idea to extend the syntax of markdown
-
-#### Extension basics
-
-micromark supports two types of extensions.
-Syntax extensions change how markdown is parsed.
-HTML extensions change how it compiles.
-
-HTML extensions are not always needed, as micromark is often used through
-[`mdast-util-from-markdown`][from-markdown] to parse to a markdown syntax tree
-So instead of an HTML extension a `from-markdown` utility is needed.
-Then, a [`mdast-util-to-markdown`][to-markdown] utility, which is responsible
-for serializing syntax trees to markdown, is also needed.
-
-When developing something for internal use only, you can pick and choose which
-parts you need.
-When open sourcing your extensions, it should probably contain four parts:
-syntax extension, HTML extension, `from-markdown` utility, and a `to-markdown`
-utility.
-
-On to our first case!
-
-#### Case: variables
-
-Let’s first outline what we want to make: render some data, similar to how
-[Liquid](https://github.com/Shopify/liquid/wiki/Liquid-for-Designers) and the
-like work, in our markdown.
-It could look like this:
-
-```markdown
-Hello, {planet}!
-```
-
-Turned into:
-
-```html
-<p>Hello, Venus!</p>
-```
-
-An opening curly brace, followed by one or more characters, and then a closing
-brace.
-We’ll then look up `planet` in some object and replace the variable with its
-corresponding value, to get something like `Venus` out.
-
-It looks simple enough, but with markdown there are often a couple more things
-to think about.
-For this case, I can see the following:
-
-* Is there a “block” version too?
-* Are spaces allowed?
- Line endings?
- Should initial and final white space be ignored?
-* Balanced nested braces?
- Superfluous ones such as `{{planet}}` or meaningful ones such as
- `{a {pla} net}`?
-* Character escapes (`{pla\}net}`) and character references
- (`{pla&#x7d;net}`)?
-
-To keep things as simple as possible, let’s not support a block syntax, see
-spaces as special, support line endings, or support nested braces.
-But to learn interesting things, we *will* support character escapes and
-\-references.
-
-Note that this particular case is already solved quite nicely by
-[`micromark-extension-mdx-expression`][mdx-expression].
-It’s a bit more powerful and does more things, but it can be used to solve this
-case and otherwise serve as inspiration.
-
-##### Setup
-
-Create a new folder, enter it, and set up a new package:
-
-```sh
-mkdir example
-cd example
-npm init -y
-```
-
-In this example we’ll use ESM, so add `type: 'module'` to `package.json`:
-
-```diff
-@@ -2,6 +2,7 @@
- "name": "example",
- "version": "1.0.0",
- "description": "",
-+ "type": "module",
- "main": "index.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
-```
-
-Add a markdown file, `example.md`, with the following text:
-
-```markdown
-Hello, {planet}!
-
-{pla\}net} and {pla&#x7d;net}.
-```
-
-To check if our extension works, add an `example.js` module, with the following
-code:
-
-```js
-import {promises as fs} from 'node:fs'
-import {micromark} from 'micromark'
-import {variables} from './index.js'
-
-main()
-
-async function main() {
- const buf = await fs.readFile('example.md')
- const out = micromark(buf, {extensions: [variables]})
- console.log(out)
-}
-```
-
-While working on the extension, run `node example` to see whether things work.
-Feel free to add more examples of the variables syntax in `example.md` if
-needed.
-
-Our extension doesn’t work yet, for one because `micromark` is not installed:
-
-```sh
-npm install micromark --save-dev
-```
-
-…and we need to write our extension.
-Let’s do that in `index.js`:
-
-```js
-export const variables = {}
-```
-
-Although our extension doesn’t do anything, running `node example` now somewhat
-works!
-
-##### Syntax extension
-
-Much in micromark is based on character codes (see [§ Preprocess][preprocess]).
-For this extension, the relevant codes are:
-
-* `-5`
- — M-0005 CARRIAGE RETURN (CR)
-* `-4`
- — M-0004 LINE FEED (LF)
-* `-3`
- — M-0003 CARRIAGE RETURN LINE FEED (CRLF)
-* `null`
- — EOF (end of the stream)
-* `92`
- — U+005C BACKSLASH (`\`)
-* `123`
- — U+007B LEFT CURLY BRACE (`{`)
-* `125`
- — U+007D RIGHT CURLY BRACE (`}`)
-
-Also relevant are the content types (see [§ Content types][content-types]).
-This extension is a *text* construct, as it’s parsed alongsides links and such.
-The content inside it (between the braces) is *string*, to support character
-escapes and -references.
-
-Let’s write our extension.
-Add the following code to `index.js`:
-
-```js
-const variableConstruct = {name: 'variable', tokenize: variableTokenize}
-
-export const variables = {text: {123: variableConstruct}}
-
-function variableTokenize(effects, ok, nok) {
- return start
-
- function start(code) {
- console.log('start:', effects, code);
- return nok(code)
- }
-}
-```
-
-The above code exports an extension with the identifier `variables`.
-The extension defines a *text* construct for the character code `123`.
-The construct has a `name`, so that it can be turned off (optional, see next
-case), and it has a `tokenize` function that sets up a state machine, which
-receives `effects` and the `ok` and `nok` states.
-`ok` can be used when successful, `nok` when not, and so constructs are a bit
-similar to how promises can *resolve* or *reject*.
-`tokenize` returns the initial state, `start`, which itself receives the current
-character code, prints some debugging information, and then returns a call
-to `nok`.
-
-Ensure that things work by running `node example` and see what it prints.
-
-Now we need to define our states and figure out how variables work.
-Some people prefer sketching a diagram of the flow.
-I often prefer writing it down in pseudo-code prose.
-I’ve also found that test driven development works well, where I write unit
-tests for how it should work, then write the state machine, and finally use a
-code coverage tool to ensure I’ve thought of everything.
-
-In prose, what we have to code looks like this:
-
-* **start**:
- Receive `123` as `code`, enter a token for the whole (let’s call it
- `variable`), enter a token for the marker (`variableMarker`), consume
- `code`, exit the marker token, enter a token for the contents
- (`variableString`), switch to *begin*
-* **begin**:
- If `code` is `125`, reconsume in *nok*.
- Else, reconsume in *inside*
-* **inside**:
- If `code` is `-5`, `-4`, `-3`, or `null`, reconsume in `nok`.
- Else, if `code` is `125`, exit the string token, enter a `variableMarker`,
- consume `code`, exit the marker token, exit the variable token, and switch
- to *ok*.
- Else, consume, and remain in *inside*.
-
-That should be it!
-Replace `variableTokenize` with the following to include the needed states:
-
-```js
-function variableTokenize(effects, ok, nok) {
- return start
-
- function start(code) {
- effects.enter('variable')
- effects.enter('variableMarker')
- effects.consume(code)
- effects.exit('variableMarker')
- effects.enter('variableString')
- return begin
- }
-
- function begin(code) {
- return code === 125 ? nok(code) : inside(code)
- }
-
- function inside(code) {
- if (code === -5 || code === -4 || code === -3 || code === null) {
- return nok(code)
- }
-
- if (code === 125) {
- effects.exit('variableString')
- effects.enter('variableMarker')
- effects.consume(code)
- effects.exit('variableMarker')
- effects.exit('variable')
- return ok
- }
-
- effects.consume(code)
- return inside
- }
-}
-```
-
-Run `node example` again and see what it prints!
-The HTML compiler ignores things it doesn’t know, so variables are now removed.
-
-We have our first syntax extension, and it sort of works, but we don’t handle
-character escapes and -references yet.
-We need to do two things to make that work:
-a) skip over `\\` and `\}` in our algorithm,
-b) tell micromark to parse them.
-
-Change the code in `index.js` to support escapes like so:
-
-```diff
-@@ -23,6 +23,11 @@ function variableTokenize(effects, ok, nok) {
- return nok(code)
- }
-
-+ if (code === 92) {
-+ effects.consume(code)
-+ return insideEscape
-+ }
-+
- if (code === 125) {
- effects.exit('variableString')
- effects.enter('variableMarker')
-@@ -35,4 +40,13 @@ function variableTokenize(effects, ok, nok) {
- effects.consume(code)
- return inside
- }
-+
-+ function insideEscape(code) {
-+ if (code === 92 || code === 125) {
-+ effects.consume(code)
-+ return inside
-+ }
-+
-+ return inside(code)
-+ }
- }
-```
-
-Finally add support for character references and character escapes between
-braces by adding a special token that defines a content type:
-
-```diff
-@@ -11,6 +11,7 @@ function variableTokenize(effects, ok, nok) {
- effects.consume(code)
- effects.exit('variableMarker')
- effects.enter('variableString')
-+ effects.enter('chunkString', {contentType: 'string'})
- return begin
- }
-
-@@ -29,6 +30,7 @@ function variableTokenize(effects, ok, nok) {
- }
-
- if (code === 125) {
-+ effects.exit('chunkString')
- effects.exit('variableString')
- effects.enter('variableMarker')
- effects.consume(code)
-```
-
-Tokens with a `contentType` will be replaced by *postprocess* (see
-[§ Postprocess][postprocess]) by the tokens belonging to that content type.
-
-##### HTML extension
-
-Up next is an HTML extension to replace variables with data.
-Change `example.js` to use one like so:
-
-```diff
-@@ -1,11 +1,12 @@
- import {promises as fs} from 'node:fs'
- import {micromark} from 'micromark'
--import {variables} from './index.js'
-+import {variables, variablesHtml} from './index.js'
-
- main()
-
- async function main() {
- const buf = await fs.readFile('example.md')
-- const out = micromark(buf, {extensions: [variables]})
-+ const html = variablesHtml({planet: '1', 'pla}net': '2'})
-+ const out = micromark(buf, {extensions: [variables], htmlExtensions: [html]})
- console.log(out)
- }
-```
-
-And add the HTML extension, `variablesHtml`, to `index.js` like so:
-
-```diff
-@@ -52,3 +52,19 @@ function variableTokenize(effects, ok, nok) {
- return inside(code)
- }
- }
-+
-+export function variablesHtml(data = {}) {
-+ return {
-+ enter: {variableString: enterVariableString},
-+ exit: {variableString: exitVariableString},
-+ }
-+
-+ function enterVariableString() {
-+ this.buffer()
-+ }
-+
-+ function exitVariableString() {
-+ var id = this.resume()
-+ if (id in data) {
-+ this.raw(this.encode(data[id]))
-+ }
-+ }
-+}
-```
-
-`variablesHtml` is a function that receives an object mapping “variables” to
-strings and returns an HTML extension.
-The extension hooks two functions to `variableString`, one when it starts,
-the other when it ends.
-We don’t need to do anything to handle the other tokens as they’re already
-ignored by default.
-`enterVariableString` calls `buffer`, which is a function that “stashes” what
-would otherwise be emitted.
-`exitVariableString` calls `resume`, which is the inverse of `buffer` and
-returns the stashed value.
-If the variable is defined, we ensure it’s made safe (with `this.encode`) and
-finally output that (with `this.raw`).
-
-##### Further exercises
-
-It works!
-We’re done!
-Of course, it can be better, such as with the following potential features:
-
-* Add support for empty variables
-* Add support for spaces between markers and string
-* Add support for line endings in variables
-* Add support for nested braces
-* Add support for blocks
-* Add warnings on undefined variables
-* Use `micromark-build`, and use `uvu/assert`, `debug`, and
- `micromark-util-symbol` (see [§ Size & debug][size-debug])
-* Add [`mdast-util-from-markdown`][from-markdown] and
- [`mdast-util-to-markdown`][to-markdown] utilities to parse and serialize the
- AST
-
-#### Case: turn off constructs
-
-Sometimes it’s needed to turn a default construct off.
-That’s possible through a syntax extension.
-Note that not everything can be turned off (such as paragraphs) and even if it’s
-possible to turn something off, it could break micromark (such as character
-escapes).
-
-To disable constructs, refer to them by name in an array at the `disable.null`
-field of an extension:
-
-```js
-import {micromark} from 'micromark'
-
-const extension = {disable: {null: ['codeIndented']}}
-
-console.log(micromark('\ta', {extensions: [extension]}))
-```
-
-Yields:
-
-```html
-<p>a</p>
-```
-
-## Architecture
-
-micromark is maintained as a monorepo.
-Many of its internals, which are used in `micromark` (core) but also useful for
-developers of extensions or integrations, are available as separate modules.
-Each module maintained here is available in [`packages/`][packages].
-
-### Overview
-
-The naming scheme in [`packages/`][packages] is as follows:
-
-* `micromark-build`
- — Small CLI to build dev code into production code
-* `micromark-core-commonmark`
- — CommonMark constructs used in micromark
-* `micromark-factory-*`
- — Reusable subroutines used to parse parts of constructs
-* `micromark-util-*`
- — Reusable helpers often needed when parsing markdown
-* `micromark`
- — Core module
-
-micromark has two interfaces: buffering (maintained in
-[`micromark/dev/index.js`](https://github.com/micromark/micromark/blob/main/packages/micromark/dev/index.js))
-and streaming (maintained in
-[`micromark/dev/stream.js`](https://github.com/micromark/micromark/blob/main/packages/micromark/dev/stream.js)).
-The first takes all input at once whereas the last uses a Node.js stream to take
-input separately.
-They thinly wrap how data flows through micromark:
-
-```txt
- micromark
-+-----------------------------------------------------------------------------------------------+
-| +------------+ +-------+ +-------------+ +---------+ |
-| -markdown->+ preprocess +-chunks->+ parse +-events->+ postprocess +-events->+ compile +-html- |
-| +------------+ +-------+ +-------------+ +---------+ |
-+-----------------------------------------------------------------------------------------------+
-```
-
-### Preprocess
-
-The **preprocessor**
-([`micromark/dev/lib/preprocess.js`](https://github.com/micromark/micromark/blob/main/packages/micromark/dev/lib/preprocess.js))
-takes markdown and turns it into chunks.
-
-A **chunk** is either a character code or a slice of a buffer in the form of a
-string.
-Chunks are used because strings are more efficient storage than character codes,
-but limited in what they can represent.
-For example, the input `ab\ncd` is represented as `['ab', -4, 'cd']` in chunks.
-
-A character **code** is often the same as what `String#charCodeAt()` yields but
-micromark adds meaning to certain other values.
-
-In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is replaced
-by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL SPACE (VS)
-characters, depending on the column at which the tab occurred.
-For example, the input `\ta` is represented as `[-2, -1, -1, -1, 97]` and `a\tb`
-as `[97, -2, -1, -1, 98]` in character codes.
-
-The characters U+000A LINE FEED (LF) and U+000D CARRIAGE RETURN (CR) are
-replaced by virtual characters depending on whether they occur together: M-0003
-CARRIAGE RETURN LINE FEED (CRLF), M-0004 LINE FEED (LF), and M-0005 CARRIAGE
-RETURN (CR).
-For example, the input `a\r\nb\nc\rd` is represented as
-`[97, -5, 98, -4, 99, -3, 100]` in character codes.
-
-The `0` (U+0000 NUL) character code is replaced by U+FFFD REPLACEMENT CHARACTER
-(`�`).
-
-The `null` code represents the end of the input stream (called *eof* for end of
-file).
-
-### Parse
-
-The **parser**
-([`micromark/dev/lib/parse.js`](https://github.com/micromark/micromark/blob/main/packages/micromark/dev/lib/parse.js))
-takes chunks and turns them into events.
-
-An **event** is the start or end of a token amongst other events.
-Tokens can “contain” other tokens, even though they are stored in a flat list,
-by entering before and exiting after them.
-
-A **token** is a span of one or more codes.
-Tokens are most of what micromark produces: the built in HTML compiler or other
-tools can turn them into different things.
-Tokens are essentially names attached to a slice, such as `lineEndingBlank` for
-certain line endings, or `codeFenced` for a whole fenced code.
-
-Sometimes, more info is attached to tokens, such as `_open` and `_close` by
-`attention` (strong, emphasis) to signal whether the sequence can open or close
-an attention run.
-These fields have to do with how the parser works, which is complex and not
-always pretty.
-
-Certain fields (`previous`, `next`, and `contentType`) are used in many cases:
-linked tokens for subcontent.
-Linked tokens are used because outer constructs are parsed first.
-Take for example:
-
-```markdown
-- *a
- b*.
-```
-
-1. The list marker and the space after it is parsed first
-2. The rest of the line is a `chunkFlow` token
-3. The two spaces on the second line are a `linePrefix` of the list
-4. The rest of the line is another `chunkFlow` token
-
-The two `chunkFlow` tokens are linked together and the chunks they span are
-passed through the flow tokenizer.
-There the chunks are seen as `chunkContent` and passed through the content
-tokenizer.
-There the chunks are seen as a paragraph and seen as `chunkText` and passed
-through the text tokenizer.
-Finally, the attention (emphasis) and data (“raw” characters) is parsed there,
-and we’re done!
-
-#### Content types
-
-The parser starts out with a document tokenizer.
-*Document* is the top-most content type, which includes containers such as block
-quotes and lists.
-Containers in markdown come from the margin and include more constructs
-on the lines that define them.
-
-*Flow* represents the sections (block constructs such as ATX and setext
-headings, HTML, indented and fenced code, thematic breaks), which like
-*document* are also parsed per line.
-An example is HTML, which has a certain starting condition (such as `<script>`
-on its own line), then continues for a while, until an end condition is found
-(such as `</style>`).
-If that line with an end condition is never found, that flow goes until the end.
-
-*Content* is zero or more definitions, and then zero or one paragraph.
-It’s a weird one, and needed to make certain edge cases around definitions spec
-compliant.
-Definitions are unlike other things in markdown, in that they behave like *text*
-in that they can contain arbitrary line endings, but *have* to end at a line
-ending.
-If they end in something else, the whole definition instead is seen as a
-paragraph.
-
-The content in markdown first needs to be parsed up to this level to figure out
-which things are defined, for the whole document, before continuing on with
-*text*, as whether a link or image reference forms or not depends on whether
-it’s defined.
-This unfortunately prevents a true streaming markdown parser.
-
-*Text* contains phrasing content (rich inline text: autolinks, character escapes
-and -references, code, hard breaks, HTML, images, links, emphasis, strong).
-
-*String* is a limited *text*-like content type which only allows character
-references and character escapes.
-It exists in things such as identifiers (media references, definitions),
-titles, or URLs and such.
-
-#### Constructs
-
-Constructs are the things that make up markdown.
-Some examples are lists, thematic breaks, or character references.
-
-Note that, as a general rule of thumb, markdown is *really weird*.
-It’s essentially made up of edge cases rather than logical rules.
-When browsing the built in constructs, or venturing to build your own, you’ll
-find confusing new things and run into complex custom hooks.
-
-One more reasonable construct is the thematic break
-([see code](https://github.com/micromark/micromark/blob/main/packages/micromark-core-commonmark/dev/lib/thematic-break.js)).
-It’s an object that defines a `name` and a `tokenize` function.
-Most of what constructs do is defined in their required `tokenize` function,
-which sets up a state machine to handle character codes streaming in.
-
-### Postprocess
-
-The **postprocessor**
-([`micromark/dev/lib/postprocess.js`](https://github.com/micromark/micromark/blob/main/packages/micromark/dev/lib/postprocess.js))
-is a small step that takes events, ensures all their
-nested content is parsed, and returns the modified events.
-
-### Compile
-
-The **compiler**
-([`micromark/dev/lib/compile.js`](https://github.com/micromark/micromark/blob/main/packages/micromark/dev/lib/compile.js))
-takes events and turns them into HTML.
-While micromark was created mostly to advance markdown parsing irrespective of
-compiling to HTML, the common case of doing so is built in.
-A built in HTML compiler is useful because it allows us to check for compliancy
-to CommonMark, the de facto norm of markdown, specified in roughly 650
-input/output cases.
-The parsing parts can still be used separately to build ASTs, CSTs, or many
-other output formats.
-
-The compiler has an interface that accepts lists of events instead of the whole
-at once, but because markdown can’t truly stream, events are buffered before
-compiling and outputting the final result.
-
-## Examples
-
-### GitHub flavored markdown (GFM)
-
-To support GFM (autolink literals, strikethrough, tables, and tasklists) use
-[`micromark-extension-gfm`][gfm].
-Say we have a file like this:
-
-```markdown
-# GFM
-
-## Autolink literals
-
-www.example.com, https://example.com, and [email protected].
-
-## Footnote
-
-A note[^1]
-
-[^1]: Big note.
-
-## Strikethrough
-
-~one~ or ~~two~~ tildes.
-
-## Table
-
-| a | b | c | d |
-| - | :- | -: | :-: |
-
-## Tag filter
-
-<plaintext>
-
-## Tasklist
-
-* [ ] to do
-* [x] done
-```
-
-Then do something like this:
-
-```js
-import fs from 'node:fs'
-import {micromark} from 'micromark'
-import {gfm, gfmHtml} from 'micromark-extension-gfm'
-
-const doc = fs.readFileSync('example.md')
-
-console.log(micromark(doc, {extensions: [gfm()], htmlExtensions: [gfmHtml()]}))
-```
-
-<details>
-<summary>Show equivalent HTML</summary>
-
-```html
-<h1>GFM</h1>
-<h2>Autolink literals</h2>
-<p><a href="http://www.example.com">www.example.com</a>, <a href="https://example.com">https://example.com</a>, and <a href="mailto:[email protected]">[email protected]</a>.</p>
-<h2>Footnote</h2>
-<p>A note<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup></p>
-<h2>Strikethrough</h2>
-<p><del>one</del> or <del>two</del> tildes.</p>
-<h2>Table</h2>
-<table>
-<thead>
-<tr>
-<th>a</th>
-<th align="left">b</th>
-<th align="right">c</th>
-<th align="center">d</th>
-</tr>
-</thead>
-</table>
-<h2>Tag filter</h2>
-&lt;plaintext&gt;
-<h2>Tasklist</h2>
-<ul>
-<li><input disabled="" type="checkbox"> to do</li>
-<li><input checked="" disabled="" type="checkbox"> done</li>
-</ul>
-<section data-footnotes="" class="footnotes"><h2 id="footnote-label" class="sr-only">Footnotes</h2>
-<ol>
-<li id="user-content-fn-1">
-<p>Big note. <a href="#user-content-fnref-1" data-footnote-backref="" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
-</li>
-</ol>
-</section>
-```
+See [§ Size & debug][size-debug] for more info.
-</details>
+### `micromark(value[, encoding][, options])`
-### Math
+Compile markdown to HTML.
-To support math use [`micromark-extension-math`][math].
-Say we have a file like this:
+###### Parameters
-```markdown
-Lift($L$) can be determined by Lift Coefficient ($C_L$) like the following equation.
+* `value` (`string` or [`Buffer`][buffer])
+ — markdown to parse
+* `encoding` (`string`, default: `'utf8'`)
+ — [character encoding][encoding] to understand `value` as when it’s a
+ `Buffer`
+* `options` ([`Options`][api-options], optional)
+ — configuration
-$$
-L = \frac{1}{2} \rho v^2 S C_L
-$$
-```
+###### Returns
-Then do something like this:
+Compiled HTML (`string`).
-```js
-import fs from 'node:fs'
-import {micromark} from 'micromark'
-import {math, mathHtml} from 'micromark-extension-math'
+### `stream(options?)`
-const doc = fs.readFileSync('example.md')
+Create a duplex (readable and writable) stream.
-console.log(micromark(doc, {extensions: [math], htmlExtensions: [mathHtml()]}))
-```
+Some of the work to parse markdown can be done streaming, but in the
+end buffering is required.
-<details>
-<summary>Show equivalent HTML</summary>
+micromark does not handle errors for you, so you must handle errors on whatever
+streams you pipe into it.
+As markdown does not know errors, `micromark` itself does not emit errors.
-```html
-<p>Lift(<span class="math math-inline"><span class="katex">…</span></span>) can be determined by Lift Coefficient (<span class="math math-inline"><span class="katex">…</span></span>) like the following equation.</p>
-<div class="math math-display"><span class="katex-display"><span class="katex">…</span></span></div>
-```
+###### Parameters
-</details>
+* `options` ([`Options`][api-options], optional)
+ — configuration
-### Syntax tree
+###### Returns
-A higher level project, [`mdast-util-from-markdown`][from-markdown], can give
-you an AST.
+Duplex stream.
-```js
-import fromMarkdown from 'mdast-util-from-markdown' // This wraps micromark.
+### `Options`
-const result = fromMarkdown('## Hello, *world*!')
+Configuration (TypeScript type).
-console.log(result.children[0])
-```
+##### Fields
-Yields:
+###### `allowDangerousHtml`
-```js
-{
- type: 'heading',
- depth: 2,
- children: [
- {type: 'text', value: 'Hello, ', position: [Object]},
- {type: 'emphasis', children: [Array], position: [Object]},
- {type: 'text', value: '!', position: [Object]}
- ],
- position: {
- start: {line: 1, column: 1, offset: 0},
- end: {line: 1, column: 19, offset: 18}
- }
-}
-```
+Whether to allow (dangerous) HTML (`boolean`, default: `false`).
-Another level up is [**remark**][remark], which provides a nice interface and
-hundreds of plugins.
+The default is `false`, which still parses the HTML according to `CommonMark`
+but shows the HTML as text instead of as elements.
-## Markdown
+Pass `true` for trusted content to get actual HTML elements.
+See [§ Security][security].
-### CommonMark
+###### `allowDangerousProtocol`
-The first definition of “Markdown” gave several examples of how it worked,
-showing input Markdown and output HTML, and came with a reference implementation
-(`Markdown.pl`).
-When new implementations followed, they mostly followed the first definition,
-but deviated from the first implementation, and added extensions, thus making
-the format a family of formats.
+Whether to allow dangerous protocols in links and images (`boolean`, default:
+`false`).
-Some years later, an attempt was made to standardize the differences between
-implementations, by specifying how several edge cases should be handled, through
-more input and output examples.
-This is known as [CommonMark][commonmark-spec], and many implementations now
-work towards some degree of CommonMark compliancy.
-Still, CommonMark describes what the output in HTML should be given some
-input, which leaves many edge cases up for debate, and does not answer what
-should happen for other output formats.
+The default is `false`, which drops URLs in links and images that use dangerous
+protocols.
-micromark passes all tests from CommonMark and has many more tests to match the
-CommonMark reference parsers.
-Finally, it comes with [CMSM][], which describes how to parse markup, instead
-of documenting input and output examples.
-
-### Grammar
-
-The syntax of markdown can be described in Backus–Naur form (BNF) as:
-
-```bnf
-markdown = .*
-```
-
-No, that’s [not a typo](http://trevorjim.com/a-specification-for-markdown/):
-markdown has no syntax errors; anything thrown at it renders *something*.
+Pass `true` for trusted content to support all protocols.
-## Project
-
-### Comparison
-
-There are many other markdown parsers out there and maybe they’re better suited
-to your use case!
-Here is a short comparison of a couple in JavaScript.
-Note that this list is made by the folks who make `micromark` and `remark`, so
-there is some bias.
-
-**Note**: these are, in fact, not really comparable: micromark (and remark)
-focus on completely different things than other markdown parsers do.
-Sure, you can generate HTML from markdown with them, but micromark (and remark)
-are created for (abstract or concrete) syntax trees—to inspect, transform, and
-generate content, so that you can make things like [MDX][], [Prettier][], or
-[Gatsby][].
-
-###### micromark
-
-micromark can be used in two different ways.
-It can either be used, optionally with existing extensions, to get HTML easily.
-Or, it can give tremendous power, such as access to all tokens with positional
-info, at the cost of being hard to get into.
-It’s super small, pretty fast, and has 100% CommonMark compliance.
-It has syntax extensions, such as supporting 100% GFM compliance (with
-`micromark-extension-gfm`), but they’re rather complex to write.
-It’s the newest parser on the block, which means it’s fresh and well suited for
-contemporary markdown needs, but it’s also battle-tested, and already the 3rd
-most popular markdown parser in JavaScript.
-
-If you’re looking for fine grained control, use micromark.
-If you just want HTML from markdown, use micromark.
-
-###### remark
-
-[remark][] is the most popular markdown parser.
-It’s built on top of `micromark` and boasts syntax trees.
-For an analogy, it’s like if Babel, ESLint, and more, were one project.
-It supports the syntax extensions that micromark has (so it’s 100% CM compliant
-and can be 100% GFM compliant), but most of the work is done in plugins that
-transform or inspect the tree, and there’s *tons* of them.
-Transforming the tree is relatively easy: it’s a JSON object that can be
-manipulated directly.
-remark is stable, widely used, and extremely powerful for handling complex data.
-
-You probably should use [remark][].
-
-###### marked
-
-[marked][] is the oldest markdown parser on the block.
-It’s been around for ages, is battle tested, small, popular, and has a bunch of
-extensions, but doesn’t match CommonMark or GFM, and is unsafe by default.
-
-If you have markdown you trust and want to turn it into HTML without a fuss, and
-don’t care about perfect compatibility with CommonMark or GFM, but do appreciate
-a small bundle size and stability, use [marked][].
-
-###### markdown-it
-
-[markdown-it][] is a good, stable, and essentially CommonMark compliant markdown
-parser, with (optional) support for some GFM features as well.
-It’s used a lot as a direct dependency in packages, but is rather big.
-It shines at syntax extensions, where you want to support not just markdown, but
-*your* (company’s) version of markdown.
-
-If you need a couple of custom syntax extensions to your otherwise
-CommonMark-compliant markdown, and want to get HTML out, use [markdown-it][].
-
-###### Others
-
-There are lots of other markdown parsers!
-Some say they’re small, or fast, or that they’re CommonMark compliant—but
-that’s not always true.
-This list is not supposed to be exhaustive (but it’s the most relevant ones).
-This list of markdown parsers is a snapshot in time of why (not) to use
-(alternatives to) `micromark`: they’re all good choices, depending on what your
-goals are.
-
-### Test
+URLs that have no protocol (which means it’s relative to the current page, such
+as `./some/page.html`) and URLs that have a safe protocol (for images: `http`,
+`https`; for links: `http`, `https`, `irc`, `ircs`, `mailto`, `xmpp`), are
+safe.
+All other URLs are dangerous and dropped.
+See [§ Security][security].
-micromark is tested with the \~650 CommonMark tests and more than 1.2k extra
-tests confirmed with CM reference parsers.
-These tests reach all branches in the code, which means that this project has
-100% code coverage.
-Finally, we use fuzz testing to ensure micromark is stable, reliable, and
-secure.
+###### `defaultLineEnding`
-To build, format, and test the codebase, use `$ npm test` after clone and
-install.
-The `$ npm run test-api` and `$ npm run test-coverage` scripts check either the
-unit tests, or both them and their coverage, respectively.
+Default line ending to use when compiling to HTML, for line endings not in
+`value` (`'\r'`, `'\n'`, or `'\r\n'`; default: first line ending or `'\n'`).
-The `$ npm run test-fuzz` script does fuzz testing for 15 minutes.
-The timeout is provided by GNU coreutils **timeout(1)**, which might not be
-available on your system.
-Either install `timeout` or remove that part temporarily from the script and
-manually exit the program after a while.
-
-### Size & debug
-
-micromark is really small.
-A ton of time went into making sure it minifies well, by the way code is written
-but also through custom build scripts to pre-evaluate certain expressions.
-Furthermore, care went into making it compress well with gzip and brotli.
-
-Normally, you’ll use the pre-evaluated version of micromark.
-While developing, debugging, or testing your code, you *should* switch to use
-code instrumented with assertions and debug messages:
+Generally, `micromark` copies line endings (`\r`, `\n`, `\r\n`) in the markdown
+document over to the compiled HTML.
+In some cases, such as `> a`, CommonMark requires that extra line endings are
+added: `<blockquote>\n<p>a</p>\n</blockquote>`.
-```sh
-node --conditions development module.js
-```
+To create that line ending, the document is checked for the first line ending
+that is used.
+If there is no line ending, `defaultLineEnding` is used.
+If that isn’t configured, `\n` is used.
-To see debug messages, use a `DEBUG` env variable set to `micromark`:
+###### `extensions`
-```sh
-DEBUG="*" node --conditions development module.js
-```
+Array of syntax extensions (`Array<SyntaxExtension>`, default: `[]`).
+See [§ Extensions][extensions].
-### Version
+###### `htmlExtensions`
-micromark adheres to [semver](https://semver.org) since 3.0.0.
+Array of syntax extensions (`Array<HtmlExtension>`, default: `[]`).
+See [§ Extensions][extensions].
-### Security
+## Types
-The typical security aspect discussed for markdown is [cross-site scripting
-(XSS)][xss] attacks.
-Markdown itself is safe if it does not include embedded HTML or dangerous
-protocols in links/images (such as `javascript:` or `data:`).
-micromark makes any markdown safe by default, even if HTML is embedded or
-dangerous protocols are used, as it encodes or drops them.
-Turning on the `allowDangerousHtml` or `allowDangerousProtocol` options for
-user-provided markdown opens you up to XSS attacks.
-
-Another security aspect is DDoS attacks.
-For example, an attacker could throw a 100mb file at micromark, in which case
-the JavaScript engine will run out of memory and crash.
-It is also possible to crash micromark with smaller payloads, notably when
-thousands of links, images, emphasis, or strong are opened but not closed.
-It is wise to cap the accepted size of input (500kb can hold a big book) and to
-process content in a different thread or worker so that it can be stopped when
-needed.
-
-Using extensions might also be unsafe, refer to their documentation for more
-information.
-
-For more information on markdown sanitation, see
-[`improper-markup-sanitization.md`][improper] by [**@chalker**][chalker].
+This package is fully typed with [TypeScript][].
+It exports the additional type [`Options`][api-options].
+
+## Compatibility
+
+Projects maintained by the unified collective are compatible with all maintained
+versions of Node.js.
+As of now, that is Node.js 16+.
+Our projects sometimes work with older versions, but this is not guaranteed.
+
+## Security
+This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
-### Contribute
+## Contribute
See [`contributing.md`][contributing] in [`micromark/.github`][health] for ways
to get started.
@@ -22005,7 +22033,9 @@ This project has a [code of conduct][coc].
By interacting with this repository, organisation, or community you agree to
abide by its terms.
-### Sponsor
+## Sponsor
+
+<!-- Note: this section has to be in sync with the monorepo readme. -->
Support this effort and give back by sponsoring on [OpenCollective][]!
@@ -22063,13 +22093,16 @@ Support this effort and give back by sponsoring on [OpenCollective][]!
<a href="https://boostnote.io">Boost Note</a><br><br>
<a href="https://boostnote.io"><img src="https://images.opencollective.com/boosthub/6318083/logo/128.png" width="64"></a>
</td>
+<td width="10%" align="center">
+ <a href="https://markdown.space">Markdown Space</a><br><br>
+ <a href="https://markdown.space"><img src="https://images.opencollective.com/markdown-space/e1038ed/logo/128.png" width="64"></a>
+</td>
<td width="10%" align="center">
<a href="https://www.holloway.com">Holloway</a><br><br>
<a href="https://www.holloway.com"><img src="https://avatars1.githubusercontent.com/u/35904294?s=128&v=4" width="64"></a>
</td>
<td width="10%"></td>
<td width="10%"></td>
-<td width="10%"></td>
</tr>
<tr valign="middle">
<td width="100%" align="center" colspan="8">
@@ -22080,65 +22113,7 @@ Support this effort and give back by sponsoring on [OpenCollective][]!
</tr>
</table>
-### Origin story
-
-Over the summer of 2018, micromark was planned, and the idea shared in August
-with a couple of friends and potential sponsors.
-The problem I (**[@wooorm][]**) had was that issues were piling up in remark and
-other repos, but my day job (teaching) was fun, fulfilling, and deserved time
-too.
-It was getting hard to combine the two.
-The thought was to feed two birds with one scone: fix the issues in remark with
-a new markdown parser (codename marydown) while being financially supported by
-sponsors building fancy stuff on top, such as Gatsby, Contentful, and Vercel
-(ZEIT at the time).
-**[@johno][]** was making MDX on top of remark at the time (important historical
-note: several other folks were working on JSX + markdown too).
-We bundled our strengths: MDX was getting some traction and we thought together
-we could perhaps make something sustainable.
-
-In November 2018, we launched with the idea for micromark to solve all existing
-bugs, sustaining the existing hundreds of projects, and furthering the exciting
-high-level project MDX.
-We pushed a single name: unified (which back then was a small but essential
-part of the chain).
-Gatsby and Vercel were immediate sponsors.
-We didn’t know whether it would work, and it worked.
-But now you have a new problem: you are getting some financial support (much
-more than other open source projects) but it’s not enough money for rent, and
-too much money to print stickers with.
-You still have your job and issues are still piling up.
-
-At the start of summer 2019, after a couple months of saving up donations, I
-quit my job and worked on unified through fall.
-That got the number of open issues down significantly and set up a strong
-governance and maintenance system for the collective.
-But when the time came to work on micromark, the money was gone again, so I
-contracted through winter 2019, and in spring 2020 I could do about half open
-source, half contracting.
-One of the contracting gigs was to write a new MDX parser, for which I also
-documented how to do that with a state machine [in prose][mdx-cmsm].
-That gave me the insight into how the same could be done for markdown: I drafted
-[CMSM][], which was some of the core ideas for micromark, but in prose.
-
-In May 2020, Salesforce reached out: they saw the bugs in remark, how micromark
-could help, and the initial work on CMSM.
-And they had thousands of Markdown files.
-In a for open source uncharacteristic move, they decided to fund my work on
-micromark.
-A large part of what maintaining open source means, is putting out fires,
-triaging issues, and making sure users and sponsors are happy, so it was
-amazing to get several months to just focus and make something new.
-I remember feeling that this project would probably be the hardest thing I’d
-work on: yeah, parsers are pretty difficult, but markdown is on another level.
-Markdown is such a giant stack of edge cases on edge cases on even more
-weirdness, what a mess.
-On August 20, 2020, I released [2.0.0][200], the first working version of
-micromark.
-And it’s hard to describe how that moment felt.
-It was great.
-
-### License
+## License
[MIT][license] © [Titus Wormer][author]
@@ -22156,9 +22131,9 @@ It was great.
[downloads]: https://www.npmjs.com/package/micromark
-[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark.svg
+[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark
-[bundle-size]: https://bundlephobia.com/result?p=micromark
+[bundle-size]: https://bundlejs.com/?q=micromark
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
@@ -22166,15 +22141,19 @@ It was great.
[opencollective]: https://opencollective.com/unified
+[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
+
+[chat]: https://github.com/micromark/micromark/discussions
+
[npm]: https://docs.npmjs.com/cli/install
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[esmsh]: https://esm.sh
-[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
+[typescript]: https://www.typescriptlang.org
-[chat]: https://github.com/micromark/micromark/discussions
+[development]: https://nodejs.org/api/packages.html#packages_resolving_user_conditions
[license]: https://github.com/micromark/micromark/blob/main/license
@@ -22182,24 +22161,18 @@ It was great.
[health]: https://github.com/micromark/.github
-[xss]: https://en.wikipedia.org/wiki/Cross-site_scripting
-
-[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
+[securitymd]: https://github.com/micromark/.github/blob/main/security.md
-[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
+[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
-[support]: https://github.com/micromark/.github/blob/HEAD/support.md
+[support]: https://github.com/micromark/.github/blob/main/support.md
-[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md
+[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
[cheat]: https://commonmark.org/help/
[twitter]: https://twitter.com/unifiedjs
-[remark]: https://github.com/remarkjs/remark
-
-[rehype]: https://github.com/rehypejs/rehype
-
[site]: https://unifiedjs.com
[contribute]: #contribute
@@ -22208,23 +22181,7 @@ It was great.
[buffer]: https://nodejs.org/api/buffer.html
-[commonmark-spec]: https://commonmark.org
-
-[popular]: https://www.npmtrends.com/remark-parse-vs-marked-vs-markdown-it
-
-[remark-parse]: https://unifiedjs.com/explore/package/remark-parse/
-
-[improper]: https://github.com/ChALkeR/notes/blob/master/Improper-markup-sanitization.md
-
-[chalker]: https://github.com/ChALkeR
-
-[cmsm]: https://github.com/micromark/common-markup-state-machine
-
-[mdx-cmsm]: https://github.com/micromark/mdx-state-machine
-
-[from-markdown]: https://github.com/syntax-tree/mdast-util-from-markdown
-
-[to-markdown]: https://github.com/syntax-tree/mdast-util-to-markdown
+[commonmark]: https://commonmark.org
[directives]: https://github.com/micromark/micromark-extension-directive
@@ -22236,75 +22193,29 @@ It was great.
[mdxjs]: https://github.com/micromark/micromark-extension-mdxjs
-[constructs]: /packages/micromark/dev/lib/constructs.js
-
-[comparison]: #comparison
-
-[extensions]: #list-of-extensions
-
-[syntax-extension]: #syntaxextension
-
-[html-extension]: #htmlextension
-
-[option-extensions]: #optionsextensions
-
-[option-htmlextensions]: #optionshtmlextensions
-
-[mdast]: https://github.com/syntax-tree/mdast
-
-[utilities]: https://github.com/syntax-tree/mdast#list-of-utilities
-
-[unified]: https://github.com/unifiedjs/unified
-
-[remark plugins]: https://github.com/remarkjs/remark/blob/main/doc/plugins.md#list-of-plugins
-
-[rehype plugins]: https://github.com/rehypejs/rehype/blob/main/doc/plugins.md#list-of-plugins
-
-[directive-proposal]: https://talk.commonmark.org/t/generic-directives-plugins-syntax/444
-
-[architecture]: #architecture
-
-[extending-markdown]: #extending-markdown
-
-[create-extension]: #creating-a-micromark-extension
+[security]: #security
-[mdx-expression]: https://github.com/micromark/micromark-extension-mdx-expression
+[sponsor]: #sponsor
-[preprocess]: #preprocess
+[micromark]: https://github.com/micromark/micromark
-[content-types]: https://github.com/micromark/micromark#content-types
+[extensions]: https://github.com/micromark/micromark#extensions
-[postprocess]: https://github.com/micromark/micromark#postprocess
+[test]: https://github.com/micromark/micromark#test
[size-debug]: https://github.com/micromark/micromark#size--debug
-[packages]: https://github.com/micromark/micromark/tree/main/packages
-
-[marked]: https://github.com/markedjs/marked
-
-[markdown-it]: https://github.com/markdown-it/markdown-it
-
-[mdx]: https://github.com/mdx-js/mdx
-
-[prettier]: https://github.com/prettier/prettier
-
-[gatsby]: https://github.com/gatsbyjs/gatsby
+[comparison]: https://github.com/micromark/micromark#comparison
-[commonmark]: #commonmark
+[markdown-rs]: https://github.com/wooorm/markdown-rs
-[size]: #size--debug
+[mdast-util-to-markdown]: https://github.com/syntax-tree/mdast-util-to-markdown
-[test]: #test
+[api-micromark]: #micromarkvalue-encoding-options
-[security]: #security
-
-[sponsor]: #sponsor
-
-[@wooorm]: https://github.com/wooorm
+[api-stream]: #streamoptions
-[@johno]: https://github.com/johno
-
-[200]: https://github.com/micromark/micromark/releases/tag/2.0.0
+[api-options]: #options
-----------
@@ -22795,7 +22706,7 @@ THE SOFTWARE.
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -22966,6 +22877,36 @@ THE SOFTWARE.
-----------
+The following NPM package may be included in this product:
+
+
+This package contains the following license and notice below:
+
+MIT License
+
+Copyright (c) 2013 James Halliday
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+-----------
+
The following NPM packages may be included in this product:
@@ -23452,12 +23393,12 @@ Apache License
The following NPM packages may be included in this product:
These packages each contain the following license and notice below:
-Copyright (C) 2016 by Marijn Haverbeke <[email protected]> and others
+Copyright (C) 2016 by Marijn Haverbeke <[email protected]> and others
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -24136,11 +24077,17 @@ SOFTWARE.
The following NPM packages may be included in this product:
These packages each contain the following license and notice below:
@@ -24166,39 +24113,6 @@ THE SOFTWARE.
-----------
-The following NPM packages may be included in this product:
-
-
-These packages each contain the following license and notice below:
-
-Copyright (C) 2015-2017 by Marijn Haverbeke <[email protected]> and others
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
------------
-
The following NPM package may be included in this product:
@@ -24367,6 +24281,44 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
-----------
+The following NPM package may be included in this product:
+
+
+This package contains the following license and notice below:
+
+BSD 3-Clause License
+
+Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors)
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-----------
+
The following NPM package may be included in this product:
@@ -24494,7 +24446,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -24547,7 +24499,7 @@ limitations under the License.
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -24608,7 +24560,7 @@ SOFTWARE.
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -25105,7 +25057,7 @@ To run the tests in this package, run the following commands from the react Nati
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -25135,7 +25087,7 @@ SOFTWARE.
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -25191,7 +25143,7 @@ SOFTWARE.
The following NPM packages may be included in this product:
These packages each contain the following license and notice below:
@@ -25293,7 +25245,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -26031,9 +25983,9 @@ abide by its terms.
The following NPM packages may be included in this product:
These packages each contain the following license and notice below:
@@ -26335,7 +26287,7 @@ OTHER DEALINGS IN THE SOFTWARE.
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -26368,11 +26320,11 @@ For more information, please refer to <http://unlicense.org>
The following NPM package may be included in this product:
This package contains the following license and notice below:
-Copyright (C) 2016 by Marijn Haverbeke <[email protected]>
+Copyright (C) 2016 by Marijn Haverbeke <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -26687,6 +26639,36 @@ THE SOFTWARE.
-----------
+The following NPM package may be included in this product:
+
+
+This package contains the following license and notice below:
+
+MIT License
+
+Copyright (c) 2019 Jordan Harband
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+-----------
+
The following NPM package may be included in this product:
@@ -27252,7 +27234,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The following NPM package may be included in this product:
This package contains the following license and notice below:
@@ -27727,7 +27709,7 @@ div {
The following NPM packages may be included in this product:
These packages each contain the following license and notice below:
@@ -28112,12 +28094,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-----------
-The following NPM packages may be included in this product:
+The following NPM package may be included in this product:
-These packages each contain the following license and notice below:
+This package contains the following license and notice below:
The MIT License (MIT)
@@ -28143,6 +28124,36 @@ SOFTWARE.
-----------
+The following NPM package may be included in this product:
+
+
+This package contains the following license and notice below:
+
+The MIT License (MIT)
+
+Copyright 2014 Joyent, Inc. and other Node contributors.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+-----------
+
The following NPM package may be included in this product: