micromark-extension-gfm

Bundles all six GitHub Flavored Markdown micromark extensions—tables, footnotes, strikethrough, autolinks, tag filtering, and task lists—into a single drop-in plugin.

Library
npm
v3.0.0
40 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
42 /100 Fair
Development Activity 52
Maintenance 24
Community 20
Maturity 60
Momentum 12

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
60 /100 Good
Architecture 65
Code Quality 90
Innovation 40
Learning Curve 45

micromark-extension-gfm is the aggregator package for GitHub Flavored Markdown (GFM) support in micromark, the CommonMark-compliant markdown parser at the core of the unified/remark/rehype ecosystem. Rather than implementing GFM parsing itself, it composes six sibling packages — micromark-extension-gfm-autolink-literal, -footnote, -strikethrough, -table, -tagfilter, and -task-list-item — into two ready-to-use extensions, gfm() for syntax and gfmHtml() for HTML serialization, using micromark-util-combine-extensions.

This makes it the one dependency most projects need instead of wiring up six separate micromark extensions by hand, and it’s the extension layer that remark-gfm relies on internally to give remark and its plugin ecosystem full GFM support (tables, footnotes, strikethrough, task lists, autolinked URLs, and disallowed-tag filtering) on top of plain CommonMark.

What You Get

  • gfm(options?) — a single micromark Extension enabling autolink literals, footnotes, strikethrough, tables, and task lists in one call
  • gfmHtml(options?) — the matching HtmlExtension for serializing all of the above to HTML, including GitHub’s disallowed-tag filtering
  • Full TypeScript types (Options, HtmlOptions) re-exported from the underlying strikethrough and footnote packages, with 100% type coverage enforced at build time
  • ESM-only, tree-shakeable package (sideEffects: false) with zero runtime dependencies outside the micromark ecosystem
  • Drop-in compatibility with micromark’s extensions/htmlExtensions options, so it works anywhere a raw micromark extension is accepted

Common Use Cases

  • Parsing GFM markdown directly with micromark - pass gfm()/gfmHtml() into micromark() calls to get GitHub-style tables, task lists, and strikethrough without hand-assembling six extensions
  • Powering remark-gfm - the package that gives the remark/unified ecosystem its GFM support, letting downstream tools produce a GFM-aware syntax tree via mdast-util-gfm
  • Building custom markdown renderers - static site generators or CMS pipelines that need GitHub-compatible markdown rendering without pulling in a full alternative parser
  • Rendering user-generated content safely - combined with allowDangerousHtml, the tagfilter extension strips disallowed raw HTML the way GitHub does for issue/PR comments

Under The Hood

Architecture This package is a thin façade over six independently published micromark GFM extensions — micromark-extension-gfm-autolink-literal, -footnote, -strikethrough, -table, -tagfilter, and -task-list-item — combined via micromark-util-combine-extensions’ combineExtensions/combineHtmlExtensions helpers inside lib/index.js, with index.js and index.d.ts doing nothing more than re-exporting gfm/gfmHtml and layering typed Options/HtmlOptions interfaces on top of the strikethrough and footnote packages’ own option types. There is no internal state, class hierarchy, or dependency injection; the entire behavior surface is composition-by-import, so the only way this package’s output changes is if one of the six wrapped extensions changes or a new one is added to the combine call — the real logic lives one level down, in six tightly coupled sibling packages within the same micromark/unified organization.

Tech Stack The runtime is pure ESM (type: module) JavaScript with zero framework dependencies — its only dependencies are other micromark-ecosystem packages (the six GFM extensions plus micromark-util-combine-extensions and micromark-util-types for typing). Development tooling is TypeScript-heavy despite being a JS-only package: tsc --build with checkJs, strict, and exactOptionalPropertyTypes type-checks the plain JavaScript source and emits declarations only, type-coverage enforces 100% type coverage as a build gate, and xo (an ESLint preset) plus prettier and remark-preset-wooorm handle linting and formatting. There is no bundler, database, or web framework involved — this is a small leaf library in the unified collective’s shared tooling chain, tested with Node’s built-in node:test runner and measured with c8.

Code Quality Tests in test/index.js exercise the published GFM spec (test/spec.js) plus generated fixtures (via the create-gfm-fixtures dev dependency), comparing micromark’s HTML output against rehype-normalized expectations for both syntax and rendering; the test suite runs twice, once under Node’s development export condition and once under production, to verify both code paths. Coverage is enforced via c8 --100, meaning the build fails below full statement/branch coverage. Combined with type-coverage’s 100% requirement and strict TypeScript checking of the JSDoc-annotated JavaScript, this gives strong quality guarantees for a package with no visible production bugs history; a GitHub Actions workflow runs the full test suite plus Codecov upload on every push and pull request across two Node.js release lines.

What Makes It Unique The package introduces no new parsing technique of its own — its entire value is aggregation: bundling six separately versioned and separately publishable GFM micromark extensions behind two functions so that consumers don’t need to independently discover, install, and manually combine each one. That convenience is genuinely useful for anyone building on raw micromark, and it’s exactly the seam remark-gfm builds on to give the broader unified ecosystem GFM support, but architecturally it’s a standard facade/aggregator pattern rather than a novel algorithm or abstraction.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers