NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #2305 most downloaded on PyPI
CommonMark compliant Markdown formatter
Last release 11 months ago
16 Oct 2025
Release timing varies
gaps range from 3 weeks to 1.1 years
Nearly every release is documented
notes for 35 of 38 stable releases
11 versions withdrawn
withdrawn after publishing
6 years old
49 releases · first in 2020
One column per quarter.
Bump version: 0.7.22 → 1.0.0
Bump version: 0.7.22 → 1.0.0
Removed
Python 3.9 support
mdformat.codepoints.ASCII_WHITESPACE (deprecated since 0.7.20)
mdformat.plugins.ParserExtensionInterface.add_cli_options (deprecated since 0.7.19)
Deprecated
Default values other than None or argparse.SUPPRESS in CLI options added by plugins. Thank you, Kyle King , for the PR.
Added
markdown-it-py v4 support
CommonMark 0.31.2 support
Fixed
Read UTF-8 from standard input on all systems. Thank you, Christopher Prohm , for the PR.
Bump version: 0.7.21 → 0.7.22
Bump version: 0.7.21 → 0.7.22
Performance
Improved import time and performance of CLI invocations that do not format Markdown.
Fixed
No longer mutate cached TOML options or _conf.DEFAULT_OPTS . This should avoid some hard to debug issues in plugins’ tests.
Added
cache_toml keyword argument to _cli.run for disabling TOML caching. This is useful in tests written for plugins.
Bump version: 0.7.20 → 0.7.21
Bump version: 0.7.20 → 0.7.21
Fixed
Circular import in plugins that import from mdformat.renderer .
Bump version: 0.7.19 → 0.7.20
Bump version: 0.7.19 → 0.7.20
NOTE: This release was yanked from PyPI.
Deprecated
mdformat.codepoints.ASCII_WHITESPACE . CommonMark no longer defines this since v0.30.
Added
--no-validate flag for disabling the AST safety check. Thank you, Kyle King , for the PR.
Added the delete control character to mdformat.codepoints.ASCII_CTRL as per CommonMark v0.30
Fixed
The AST safety check not triggering when a code formatter plugin is in use, two or more code blocks are in the same file, and unsafe formatting happens in between the code blocks.
Bump version: 0.7.18 → 0.7.19
Bump version: 0.7.18 → 0.7.19
Deprecated
Plugin interface: mdformat.plugins.ParserExtensionInterface.add_cli_options . The replacing interface is mdformat.plugins.ParserExtensionInterface.add_cli_argument_group .
Fixed
Incorrect line wrap on lines right after a hard break. Thank you, MDW , for the issue.
Adding an extra leading space to paragraphs that start with space in line wrap modes.
An error on empty paragraph (Unicode space only) surrounded by non-paragraph elements. Thank you, Nico Schlömer , for the issue.
Added
Plugin interface: mdformat.plugins.ParserExtensionInterface.add_cli_argument_group . With this plugins can now read CLI arguments merged with values from .mdformat.toml .
Option to select enabled (and required) extensions and code formatter languages ( --extensions and --codeformatters on the CLI, and extensions and codeformatters keys in TOML).
Improved plugin list at the end of --help output: List languages supported by codeformatter plugin distributions, and parser extensions added by parser extension distributions.
Changed
Style: No longer escape square bracket enclosures.
Style: No longer escape less than sign followed by space character.
Style: Convert tabs to spaces. Reduce space sequences to one space.
Improved
Plugin interface: A trailing newline is added to fenced code blocks if a plugin fails to add it.
Bump version: 0.7.17 → 0.7.18
Bump version: 0.7.17 → 0.7.18
Added
Option to exclude file paths using Unix-style glob patterns ( --exclude on the CLI and exclude key in TOML). This feature is Python 3.13+ only. Thank you, J. Sebastian Paez , for the issue.
Removed
Python 3.8 support
Bump version: 0.7.16 → 0.7.17
Bump version: 0.7.16 → 0.7.17
Added
Do not update mtime if formatting result is identical to the file. Thank you, Pierre Augier , for the issue and the PR.
Fixed
An error on empty paragraph (Unicode space only). Thank you, Nico Schlömer , for the issue.
File write fails if no permissions to write to the directory. Fixed by removing atomic writes. Thank you, Guy Kisel , for the issue.
File permissions change on rewrite. Thank you, Keiichi Watanabe , for the issue.
Removed
Python 3.7 support
Bump version: 0.7.15 → 0.7.16
Bump version: 0.7.15 → 0.7.16
Added
Option to keep line ending sequence from source file ( --end-of-line=keep ). Thank you, Mark Tsuchida , for the issue and Jan Wille for the PR.
Fixed
--check not working with --end-of-line=crlf . Thank you, Jan Wille , for the issue.
Insignificant Unicode whitespace causing unstable formatting. Thank you, Yamada_Ika , for the issue.
Bump version: 0.7.14 → 0.7.15
Bump version: 0.7.14 → 0.7.15
Fixed
--wrap converts Unicode whitespace to regular spaces and line feeds. Thank you, Nico Schlömer , for the issue.
Packaging
Use setuptools as build backend
Bump version: 0.7.13 → 0.7.14
Bump version: 0.7.13 → 0.7.14
Added
Accept os.PathLike[str] as mdformat.file input.
Improved
Add filepath to warning message on code formatter plugin error.
Use tomllib in Python 3.11+.
Changed
Style: Sort numeric link references numerically. Thank you Ryan Delaney for the PR.
- Don’t indent inline HTML that looks like type 7 block HTML. Thank you Philip May for the issue.
Fixed
Don’t indent inline HTML that looks like type 7 block HTML. Thank you Philip May for the issue.
- Fix unstable formatting when a paragraph line starts with inline HTML. Thank you Gabriel Nützi for the issue.
Fixed
Fix unstable formatting when a paragraph line starts with inline HTML. Thank you Gabriel Nützi for the issue.
- Support for markdown-it-py v2
Added
Support for markdown-it-py v2
Fixed
Fix an error when a code fence info string starts with a tilde or a backtick. Thank you Jonathan Newnham for the issue.
- Support for configuration in a .mdformat.toml file
Added
Support for configuration in a .mdformat.toml file
Removed
Python 3.6 support
- Fix an error when an autolink contains URL encoded spaces. Thank you Chris Butler for the issue.
Fixed
Fix an error when an autolink contains URL encoded spaces. Thank you Chris Butler for the issue.
- Fix a case where indented Markdown nested inside indented raw HTML tags would alter AST. Thank you Jirka Borovec for the issue.
Fixed
Fix a case where indented Markdown nested inside indented raw HTML tags would alter AST. Thank you Jirka Borovec for the issue.
- Output lf line endings on all platforms. Thank you Scott Gudeman for the issue and the PR.
Fixed
Output lf line endings on all platforms. Thank you Scott Gudeman for the issue and the PR.
Added
Configuration option for outputting crlf line endings: --end-of-line=crlf
Resolve symlinks and modify the link destination file only.
- Style: Reduce wrap width by indent size in lists and quotes
Changed
Style: Reduce wrap width by indent size in lists and quotes
- Error rendering a hard break in a heading
Fixed
Error rendering a hard break in a heading
Some obscure leading/trailing whitespace issues
Style: Convert image description newlines to spaces in wrap altering modes
- mdformat.renderer.WRAP_POINT for plugins to show where word wrap is allowed to occur.
Added
mdformat.renderer.WRAP_POINT for plugins to show where word wrap is allowed to occur.
mdformat.renderer.RenderContext.do_wrap for plugins to check whether word wrap is enabled.
Changed
Style: Emphasis and strong emphasis are now wrapped.
Style: Word wrap width target is now respected more precisely in a few edge cases.
- Style: Convert link text newlines to spaces in wrap altering modes.
Fixed
Style: Convert link text newlines to spaces in wrap altering modes.
Changed
Style: No longer escape line starting hashes not followed by a space.
- Style: Stop adding a newline character to empty documents.
Fixed
Style: Stop adding a newline character to empty documents.
- RenderContext.with_default_renderer_for : A convenience method for copying a render context with a set of renderers set to defaults
Added
RenderContext.with_default_renderer_for : A convenience method for copying a render context with a set of renderers set to defaults
NOTE: Parser extension plugin API has changed in this release.
NOTE: Parser extension plugin API has changed in this release.
Added
POSTPROCESSORS mapping to parser extension plugin API (i.e. ParserExtensionInterface ), providing a way for plugins to render syntax collaboratively.
Postprocess type alias to mdformat.renderer.typing
mdformat.renderer.RenderContext : a context object passed as input to Render and Postprocess functions
Changed
Renamed ParserExtensionInterface.RENDERER_FUNCS as ParserExtensionInterface.RENDERERS
Renamed mdformat.renderer.typing.RendererFunc as mdformat.renderer.typing.Render
mdformat.renderer.typing.Render signature changed. Now takes RenderContext as input.
Renamed mdformat.renderer.DEFAULT_RENDERER_FUNCS as mdformat.renderer.DEFAULT_RENDERERS
- Warnings being printed twice when wrap mode is other than “keep”
Fixed
Warnings being printed twice when wrap mode is other than “keep” ( #167 )
An extra newline being added when consecutive lines’ width equals wrap width ( #166 )
- A list of installed plugins and their versions in the output of --help and --version CLI commands
Added
A list of installed plugins and their versions in the output of --help and --version CLI commands
mdformat.codepoints as public API
- Atomic file writes. Markdown content now stays on disk every nanosecond of the formatting process.
Added
Sphinx docs
Atomic file writes. Markdown content now stays on disk every nanosecond of the formatting process.
- A line starting blockquote marker (“>”) is now escaped.
Fixed
A line starting blockquote marker (“>”) is now escaped.
NOTE: Parser extension plugin API has changed in this release.
NOTE: Parser extension plugin API has changed in this release.
Removed
mdformat.renderer.MARKERS
mdformat.plugins.ParserExtensionInterface.render_token
start and stop keyword arguments removed from mdformat.renderer.MDRenderer.render . Use mdformat.renderer.MDRenderer.render_tree to render a part of a Markdown document.
Added
Modes for setting a word wrap width and removing word wrap
mdformat.plugins.ParserExtensionInterface.RENDERER_FUNCS
A class for representing linear markdown-it token stream as a tree: mdformat.renderer.RenderTreeNode
mdformat.renderer.MDRenderer.render_tree for rendering a RenderTreeNode
- CLI crash when formatting standard error output and the operating system reports a terminal window width of zero or less ( #131 ). Thank you ehontor
Fixed
CLI crash when formatting standard error output and the operating system reports a terminal window width of zero or less ( #131 ). Thank you ehontoria for the issue.
- Style: Reduce asterisk escaping
Changed
Style: Reduce asterisk escaping ( #120 )
Style: Reduce underscore escaping ( #119 ). Thank you dustinmichels for the issue.
- Style: Don’t convert shortcut reference links into full reference links
Changed
Style: Don’t convert shortcut reference links into full reference links ( #111 )
- Style: Reduce hash ( # ) escaping
Changed
Style: Reduce hash ( # ) escaping
Nothing published for this version
Nothing published for this version
Nothing published for this version
- Style: Convert list marker types. Prefer “-” for bullet lists and “.” for ordered lists.
Changed
Style: Convert list marker types. Prefer “-” for bullet lists and “.” for ordered lists.
Style: Remove trailing whitespace from empty list items.
- Style: Only surround link destination with angle brackets if required by CommonMark spec
Changed
Style: Only surround link destination with angle brackets if required by CommonMark spec
Style: Thematic breaks are now 70 characters wide
- Markdown equality validation falsely triggering when code formatter plugins were used. Thanks chrisjsewell for writing the tests to find the bug.
Fixed
Markdown equality validation falsely triggering when code formatter plugins were used. Thanks chrisjsewell for writing the tests to find the bug.
Nothing published for this version
- CHANGES_AST to extension plugin API. The feature allows plugins that alter Markdown AST to skip validation ( #49 ).
Added
CHANGES_AST to extension plugin API. The feature allows plugins that alter Markdown AST to skip validation ( #49 ).
- Style: Keep reference links as reference links ( #32 ). Thank you chrisjsewell for the issue and the PR.
Changed
Style: Keep reference links as reference links ( #32 ). Thank you chrisjsewell for the issue and the PR.
Added
Option to number ordered list items consecutively using the --number flag ( #33 ). Thank you chrisjsewell for the issue and the PR.
Parser extension plugins can now add their own CLI / Python API options ( #35 ). Thanks chrisjsewell for the PR.
Fixed
Image links that require surrounding angle brackets no longer break formatting ( #40 ).
- Plugin system for extending the parser ( #13 ). Thank you chrisjsewell for the issue and the PR.
Added
Plugin system for extending the parser ( #13 ). Thank you chrisjsewell for the issue and the PR.
Exported mdformat.renderer.MDRenderer and mdformat.renderer.MARKERS
- Code formatter plugin function signature changed to Callable[[str, str], str] . The second input argument is full info string of the code block.
Changed
Code formatter plugin function signature changed to Callable[[str, str], str] . The second input argument is full info string of the code block.
- Style: Use backtick for code fences whenever possible
Changed
Style: Use backtick for code fences whenever possible
Nothing published for this version
- Support for code formatter plugins
Added
Support for code formatter plugins
Nothing published for this version
- Added - Initial mdformat release On this page - Changelog - 1.0.0 - 0.7.22 - 0.7.21 - 0.7.20 - 0.7.19 - 0.7.18 - 0.7.17 - 0.7.16 - 0.7.15 - 0.7.14 -
Added
Initial mdformat release
On this page
Changelog
1.0.0
0.7.22
0.7.21
0.7.20
0.7.19
0.7.18
0.7.17
0.7.16
0.7.15
0.7.14
0.7.13
0.7.12
0.7.11
0.7.10
0.7.9
0.7.8
0.7.7
0.7.6
0.7.5
0.7.4
0.7.3
0.7.2
0.7.1
0.7.0
0.6.4
0.6.3
0.6.2
0.6.1
0.6.0
0.5.7
0.5.6
0.5.5
0.5.4
0.5.0
0.4.0
0.3.5
0.3.3
0.3.2
0.3.1
0.3.0
0.2.0
0.1.2
0.1.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →