Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
micromark-extension-gfm-table
Advanced tools
The micromark-extension-gfm-table npm package is a plugin for the micromark Markdown parser that adds support for GitHub Flavored Markdown (GFM) tables. This extension allows developers to parse and render tables in Markdown text according to the GFM specification, which is particularly useful for projects that need to handle GitHub-style Markdown.
Parsing GFM tables
This feature allows the parsing of GitHub Flavored Markdown tables into HTML. The code sample demonstrates how to use the micromark parser with the gfm-table extension to convert a simple Markdown table into HTML.
const micromark = require('micromark');
const gfmTable = require('micromark-extension-gfm-table');
const markdown = '| Header 1 | Header 2 |\n| --------- | --------- |\n| Cell 1 | Cell 2 |';
const html = micromark(markdown, {
extensions: [gfmTable]
});
console.log(html);
markdown-it is a Markdown parser that can be extended with plugins, similar to micromark. It supports GFM tables through its own plugin system. Compared to micromark-extension-gfm-table, markdown-it provides a more comprehensive solution with additional plugins for various Markdown extensions, making it versatile but potentially heavier.
remark-gfm is a plugin for the remark Markdown processor that adds support for GFM features, including tables. It is part of the unified collective and works in the ecosystem involving remark and rehype for processing Markdown and HTML respectively. Compared to micromark-extension-gfm-table, remark-gfm is typically used in a broader processing pipeline that can handle a wide range of transformations and outputs.
micromark extension to support GitHub flavored markdown tables. This syntax extension matches the GFM spec and github.com.
This package provides the low-level modules for integrating with the micromark tokenizer and the micromark HTML compiler.
You probably shouldn’t use this package directly, but instead use
mdast-util-gfm-table
with
mdast.
npm:
npm install micromark-extension-gfm-table
html
syntax
Note:
syntax
is the default export of this module,html
is available atmicromark-extension-gfm-table/html
.
Support tables.
The exports are extensions for the micromark parser (to tokenize tables; can be
passed in extensions
) and the default HTML compiler (to compile as <table>
elements; can be passed in htmlExtensions
).
remarkjs/remark
— markdown processor powered by pluginsmicromark/micromark
— the smallest commonmark-compliant markdown parser that existssyntax-tree/mdast-util-gfm-table
— mdast utility to support tablessyntax-tree/mdast-util-from-markdown
— mdast parser using micromark
to create mdast from markdownsyntax-tree/mdast-util-to-markdown
— mdast serializer to create markdown from mdastSee 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.
FAQs
micromark extension to support GFM tables
The npm package micromark-extension-gfm-table receives a total of 2,954,529 weekly downloads. As such, micromark-extension-gfm-table popularity was classified as popular.
We found that micromark-extension-gfm-table demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.