skillfed

mdformat-gfm

Mdformat plugin for GitHub Flavored Markdown compatibility

mdformat-gfm v1.0.0 1.4M downloads/30d#3,922 on PyPI25
Permissive license MIT Active released

What it is and what it does

Mdformat-gfm is a plugin for mdformat that shifts the formatting target from CommonMark to GitHub Flavored Markdown. It enables mdformat to understand and preserve GFM-specific syntax extensions: tables, task list items (checkboxes), strikethroughs, autolinks, and raw HTML handling rules. The plugin is installed via pipx injection into an existing mdformat installation and integrates as a drop-in formatter for GFM-heavy projects.

The package depends on mdformat as its core formatter, along with markdown-it-py and mdit-py-plugins for parsing, and wcwidth for text measurement. It adds a `--compact-tables` CLI flag to strip alignment spaces from tables, and can be configured via `.mdformat.toml` for persistent settings. This is useful for teams using GitHub as their primary documentation platform or for projects that rely on GFM syntax in their markdown workflows.

Use it for:

  • Format markdown documentation in GitHub repositories that use tables and task lists.
  • Enforce consistent GFM syntax style across a project's README and wiki files.
  • Automatically compact GFM tables to reduce whitespace in version-controlled markdown.
  • Integrate GFM formatting into CI/CD pipelines for documentation linting.
  • Convert and reformat CommonMark documents to GitHub Flavored Markdown syntax.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Mdformat-gfm extends mdformat to format GitHub Flavored Markdown, adding support for tables, task lists, strikethroughs, autolinks, and disallowed raw HTML syntax.

Yes, if you format GFM markdown regularly. The package is actively maintained, has no known vulnerabilities, installs cleanly, and is MIT-licensed. It's a straightforward plugin for mdformat that adds necessary GFM support without friction. Install it if your workflow involves GitHub markdown; skip it if you only use CommonMark.

Install

mdformat-gfm on PyPI

pip

pip install mdformat-gfm

uv

uv add mdformat-gfm

poetry

poetry add mdformat-gfm

Installing mdformat-gfm

Before you install

Low install friction with a pure-Python wheel. Maintenance is active with a recent release and ongoing commits; the package is in the top 5000 by downloads.

License in practice

MIT license permits commercial and private use with minimal restrictions, making it safe for most projects.

Quickstart

pipx install mdformat
pipx inject mdformat mdformat-gfm
mdformat --gfm file.md

Requires Python 3.10 or later.

Verify before relying

  • Whether compact_tables option works correctly with all GFM table edge cases.
  • Performance characteristics when formatting very large markdown files with complex tables.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 4 — mdformat, markdown-it-py, mdit-py-plugins, wcwidth
Maintenance actively maintained — 302 days since the last release
Last repo commit
First released
Downloads 1,422,590/month — #3,922 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: mdformat_gfm-1.0.0-py3-none-any.whl

Keywords: mdformat, markdown, formatter, gfm

Topic :: DocumentationTopic :: Text Processing :: Markup

Tags

markdown formatter gfmgithub flavored markdown formatmdformat plugin tablesmarkdown table formattergfm syntax formattergithub markdown linterformat markdown with tables
markdown-formattinggithub-flavored-markdown

More Markup packages