unified

Project: micromark/micromark

Package: micromark-util-combine-extensions@1.0.0

  1. Dependents: 0
  2. micromark utility to combine syntax or html extensions
  1. util 147
  2. utility 143
  3. micromark 35
  4. extension 9
  5. combine 3

micromark-util-combine-extensions

Build Coverage Downloads Size Sponsors Backers Chat

micromark utility to combine syntax or html extensions.

Contents

Install

This package is ESM only. In Node.js (version 12.20+, 14.14+, 16.0+, 18.0+), install with npm:

npm install micromark-util-combine-extensions

In Deno with esm.sh:

import {combineExtensions} from 'https://esm.sh/micromark-util-combine-extensions@1'

In browsers with esm.sh:

<script type="module">
  import {combineExtensions} from 'https://esm.sh/micromark-util-combine-extensions@1?bundle'
</script>

Use

import {gfmAutolinkLiteral} from 'micromark-extension-gfm-autolink-literal'
import {gfmStrikethrough} from 'micromark-extension-gfm-strikethrough'
import {gfmTable} from 'micromark-extension-gfm-table'
import {gfmTaskListItem} from 'micromark-extension-gfm-task-list-item'
import {combineExtensions} from 'micromark-util-combine-extensions'

const gfm = combineExtensions([gfmAutolinkLiteral, gfmStrikethrough(), gfmTable, gfmTaskListItem])

API

This module exports the following identifiers: combineExtensions, combineHtmlExtensions. There is no default export.

combineExtensions(extensions)

Combine several syntax extensions into one.

Parameters
Returns

A single combined extension (Extension).

combineHtmlExtensions(htmlExtensions)

Combine several html extensions into one.

Parameters
Returns

A single combined html extension (HtmlExtension).

Security

See security.md in micromark/.github for how to submit a security report.

Contribute

See contributing.md in micromark/.github for ways to get started. See support.md for ways to get help.

This project has a code of conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.

License

MIT © Titus Wormer