Changelog#
This log documents all Python API or CLI breaking backwards incompatible changes. Note that there is currently no guarantee for a stable Markdown formatting style across versions.
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.
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
0.7.14#
Added
Accept
os.PathLike[str]
asmdformat.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.
0.7.13#
Fixed
Don’t indent inline HTML that looks like type 7 block HTML. Thank you Philip May for the issue.
0.7.12#
Fixed
Fix unstable formatting when a paragraph line starts with inline HTML. Thank you Gabriel Nützi for the issue.
0.7.11#
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.
0.7.10#
Added
Support for configuration in a
.mdformat.toml
file
Removed
Python 3.6 support
0.7.9#
Fixed
Fix an error when an autolink contains URL encoded spaces. Thank you Chris Butler for the issue.
0.7.8#
Fixed
Fix a case where indented Markdown nested inside indented raw HTML tags would alter AST. Thank you Jirka Borovec for the issue.
0.7.7#
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.
0.7.6#
Changed
Style: Reduce wrap width by indent size in lists and quotes
0.7.5#
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
0.7.4#
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.
0.7.3#
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.
0.7.2#
Fixed
Style: Stop adding a newline character to empty documents.
0.7.1#
Added
RenderContext.with_default_renderer_for
: A convenience method for copying a render context with a set of renderers set to defaults
0.7.0#
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 tomdformat.renderer.typing
mdformat.renderer.RenderContext
: a context object passed as input toRender
andPostprocess
functions
Changed
Renamed
ParserExtensionInterface.RENDERER_FUNCS
asParserExtensionInterface.RENDERERS
Renamed
mdformat.renderer.typing.RendererFunc
asmdformat.renderer.typing.Render
mdformat.renderer.typing.Render
signature changed. Now takesRenderContext
as input.Renamed
mdformat.renderer.DEFAULT_RENDERER_FUNCS
asmdformat.renderer.DEFAULT_RENDERERS
0.6.4#
0.6.3#
Added
A list of installed plugins and their versions in the output of
--help
and--version
CLI commandsmdformat.codepoints
as public API
0.6.2#
Added
Sphinx docs
Atomic file writes. Markdown content now stays on disk every nanosecond of the formatting process.
0.6.1#
Fixed
A line starting blockquote marker (“>”) is now escaped.
0.6.0#
NOTE: Parser extension plugin API has changed in this release.
Removed
mdformat.renderer.MARKERS
mdformat.plugins.ParserExtensionInterface.render_token
start
andstop
keyword arguments removed frommdformat.renderer.MDRenderer.render
. Usemdformat.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 aRenderTreeNode
0.5.7#
0.5.6#
Changed
Style: Reduce asterisk escaping (#120)
Style: Reduce underscore escaping (#119). Thank you dustinmichels for the issue.
0.5.5#
Changed
Style: Don’t convert shortcut reference links into full reference links (#111)
0.5.4#
Changed
Style: Reduce hash (
#
) escaping
0.5.0#
Changed
Style: Convert list marker types. Prefer “-” for bullet lists and “.” for ordered lists.
Style: Remove trailing whitespace from empty list items.
0.4.0#
Changed
Style: Only surround link destination with angle brackets if required by CommonMark spec
Style: Thematic breaks are now 70 characters wide
0.3.5#
Fixed
Markdown equality validation falsely triggering when code formatter plugins were used. Thanks chrisjsewell for writing the tests to find the bug.
0.3.3#
Added
CHANGES_AST
to extension plugin API. The feature allows plugins that alter Markdown AST to skip validation (#49).
0.3.2#
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).
0.3.1#
Added
Plugin system for extending the parser (#13). Thank you chrisjsewell for the issue and the PR.
Exported
mdformat.renderer.MDRenderer
andmdformat.renderer.MARKERS
0.3.0#
Changed
Code formatter plugin function signature changed to
Callable[[str, str], str]
. The second input argument is full info string of the code block.
0.2.0#
Changed
Style: Use backtick for code fences whenever possible
0.1.2#
Added
Support for code formatter plugins
0.1.0#
Added
Initial mdformat release