skillfed

mdformat_myst

Mdformat plugin for MyST compatibility.

mdformat-myst v0.3.0 228.8K downloads/30d#9,143 on PyPI18
Permissive license MIT AGING released

What it is and what it does

mdformat-myst is a plugin for the mdformat Markdown formatter that shifts its target specification from CommonMark to MyST, a richer Markdown variant used in the Jupyter and Sphinx ecosystems. It allows mdformat to understand and consistently format MyST-specific syntax such as directives, roles, inline and block math, comments, block breaks, targets, front matter, and footnotes—features that standard CommonMark formatters would not recognize.

The plugin works by extending mdformat's parsing and formatting rules. You install it alongside mdformat and use mdformat normally; the plugin integrates into the tool's pipeline. It depends on mdformat itself, mdit-py-plugins for parsing, and several other mdformat plugins (front-matters, footnote, gfm) to handle the full range of MyST extensions. This makes it useful for projects that author documentation or content in MyST and need consistent formatting without manual intervention.

Use it for:

  • Format Jupyter Book or Sphinx documentation written in MyST Markdown while preserving directives and roles.
  • Enforce consistent style on MyST files that use math blocks, tables, and custom directives across a project.
  • Integrate MyST formatting into CI/CD pipelines to lint and auto-format documentation sources.
  • Convert and format existing Markdown to MyST-compatible syntax with proper handling of extended features.
  • Maintain code style consistency in technical documentation that mixes CommonMark and MyST syntax.

Worth the install?

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

mdformat-myst is an mdformat plugin that extends Markdown formatting to support MyST syntax, including tables, directives, roles, math, comments, block breaks, targets, front matter, and footnotes.

Yes, if you author in MyST Markdown and want automated formatting. The package has low install friction, permissive licensing, and no known vulnerabilities. Maintenance is aging (260 days since last release), so verify that the version supports your MyST and mdformat versions before adopting in production pipelines.

Install

mdformat-myst on PyPI

pip

pip install mdformat-myst

uv

uv add mdformat-myst

poetry

poetry add mdformat-myst

Installing mdformat_myst

Before you install

Install friction is low; the package is a pure Python wheel with six runtime dependencies. Maintenance status is aging—last release was 260 days ago, though the repository remains active and not archived.

License in practice

MIT license is permissive, allowing commercial and private use with minimal restrictions.

Quickstart

pip install mdformat-myst

mdformat --help
# Then use mdformat on .md files; the plugin automatically extends mdformat to handle MyST syntax

Requires Python 3.10 or later.

Verify before relying

  • Whether the plugin is automatically discovered by mdformat or requires explicit configuration to activate.
  • Performance characteristics when formatting large files or projects with many MyST-specific features.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 6 — mdformat, mdit-py-plugins, mdformat-front-matters, mdformat-footnote, mdformat-gfm, ruamel.yaml
Maintenance aging — 260 days since the last release
Last repo commit
First released
Downloads 228,835/month — #9,143 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: mdformat_myst-0.3.0-py3-none-any.whl

Keywords: mdformat, markdown, formatter, gfm

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Topic :: Software Development :: Libraries :: Python Modules

Tags

markdown formatter myst pluginformat myst markdown syntaxmdformat myst extensionmarkdown directive formattermyst parser markdown formattingmarkdown math and roles formattercommonmark myst compatibility
markdown-formattingmyst-parserdocumentation-tools

More Python Modules packages