Package Exports
- micromark-extension-gfm-table
Readme
micromark-extension-gfm-table
micromark extension to support GitHub flavored markdown (GFM) tables. This syntax extension matches the GFM spec and github.com.
When to use this
You should probably use micromark-extension-gfm
instead, which combines this package with other GFM features.
Alternatively, if you don’t want all of GFM, use this package.
Install
This package is ESM only:
Node 12+ is needed to use it and it must be imported instead of required.
npm:
npm install micromark-extension-gfm-tableUse
import {micromark} from 'micromark'
import {gfmTable, gfmTableHtml} from 'micromark-extension-gfm-table'
const output = micromark('| a |\n| - |', {
extensions: [gfmTable],
htmlExtensions: [gfmTableHtml]
})
console.log(output)Yields:
<table>
<thead>
<tr>
<th>a</th>
</tr>
</thead>
</table>API
This package exports the following identifiers: gfmTable, gfmTableHtml.
There is no default export.
The export map supports the endorsed
development condition.
Run node --conditions development module.js to get instrumented dev code.
Without this condition, production code is loaded.
gfmTable
gfmTableHtml
An extension for micromark to parse tables (can be passed in
extensions) and one to compile to <table> elements (can be passed in
htmlExtensions).
Related
remarkjs/remark— markdown processor powered by pluginsremarkjs/remark-gfm— remark plugin using this and other GFM featuresmicromark/micromark— the smallest commonmark-compliant markdown parser that existsmicromark/micromark-extension-gfm— micromark extension combining this with other GFM featuressyntax-tree/mdast-util-gfm-table— mdast utility to support tablessyntax-tree/mdast-util-gfm— mdast utility to support GFMsyntax-tree/mdast-util-from-markdown— mdast parser usingmicromarkto create mdast from markdownsyntax-tree/mdast-util-to-markdown— mdast serializer to create markdown from mdast
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, organization, or community you agree to abide by its terms.