Mdformat-gfm is an mdformat plugin that extends the core mdformat library to support GitHub Flavored Markdown (GFM) syntax extensions, including tables, task list items, strikethroughs, and autolinks. It allows mdformat to properly format Markdown files that utilize these GFM features. The library is currently at version 1.0.0 and typically releases new versions in sync with its parent library, mdformat.
pip install mdformat mdformat-gfmVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to use `mdformat` with the `mdformat-gfm` plugin via its Python API. The `mdformat-gfm` plugin is automatically loaded by `mdformat` once installed, and its GFM capabilities are enabled by passing `extensions=['gfm']` to `mdformat.text()` or `mdformat.file()`.
Upgrade your Python environment to 3.10 or later.
Remove `mdformat-tables` and ensure `mdformat-gfm` is installed. Use the `gfm` extension for full GFM (including tables) support.
It is highly recommended to pin the `mdformat` and `mdformat-gfm` dependencies to exact versions in your project to ensure consistent formatting results.
If conflicts arise, try updating all `mdformat` related plugins to their latest compatible versions or review the dependency trees for conflicting `markdown-it-py` or `mdit-py-plugins` requirements.
If precise table alignment is desired, ensure `--compact-tables` is not used in the CLI or `compact_tables` is set to `false` in your TOML configuration.