--- id: mdformat-gfm version: "1.0.0" license: MIT license_treatment: permissive maintenance: active --- # mdformat-gfm — Mdformat plugin for GitHub Flavored Markdown compatibility License: permissive · Maintenance: active · Downloads: 1.4M/mo ## 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 above — 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 pip install mdformat-gfm uv add mdformat-gfm 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_current - Install friction: low - Maintenance: active - Downloads: 1.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags markdown formatter gfm, github flavored markdown format, mdformat plugin tables, markdown table formatter, gfm syntax formatter, github markdown linter, format markdown with tables, markdown-formatting, github-flavored-markdown [View on SkillFed](https://skillfed.io/packages/mdformat-gfm) · [View on PyPI](https://pypi.org/project/mdformat-gfm/)