Change Log¶
Version 2.1.0 (2026-09-24)¶
Support Mistune 3.3.
Version 2.0.0 (2026-09-24)¶
Breaking changes¶
Replace the Python
disable_inline_mathargument withinline_math, accepting"legacy","dollar", orNone.Require Mistune 3.2 so footnote rendering shares document definitions.
Remove the
rendererargument fromM2R2.SphinxM2R2constructs a converter from a docutils document for Sphinx integrations.Make
RestRendererrender only the document body when it is used directly with Mistune.M2R2writes the role and substitution definitions for a complete document.Shorten generated substitution names to a type prefix and twelve hexadecimal hash characters.
Discard Markdown link titles, which RST references cannot represent.
Resolve fragment links under Sphinx with the
m2r-anchorrole instead of:ref:.Render links in headings with plain text and anonymous references so section ids stay readable.
Start absolute
mdincludepaths at the Sphinx source directory instead of the filesystem root.
Fixes and additions¶
Resolve relative Markdown image paths from the included file’s directory, including nested includes. Keep image substitutions distinct when different files use the same relative image path.
Convert GitHub alerts (
[!NOTE],[!TIP],[!IMPORTANT],[!WARNING], and[!CAUTION]) into RST admonitions.Add dollar-delimited inline math with
inline_math="dollar", supporting \(...\) and dollar-backtick delimiters. Keep"legacy"as the default and useNoneto disable inline math.Add
--inline-math legacyand--inline-math dollarto the CLI. Keep--disable-inline-mathto turn off inline math.Add the Sphinx setting
m2r_inline_math. Keepm2r_disable_inline_mathas a deprecated alias with a warning. An explicit new setting takes precedence.Write document definitions after footnotes render, so links and images in footnotes have their definitions.
Preserve emphasis around links and inline markup within link text by using substitutions where RST cannot express the nesting directly.
Render empty links as empty references and move footnote references out of link text.
Prevent references from nesting inside links. Linked images lose their own targets, and plain link text escapes characters that create RST references.
Render strikethrough content as HTML and keep its inline Markdown formatting.
Preserve backslashes in text.
Derive image alt text from plain text.
Resolve same-page and cross-page links to Markdown headings by their GitHub anchors. Resolve explicit RST labels before generated heading anchors with the same name.
Add
start-after,end-before,lines,literal,code,number-lines,name, andclasstomdinclude. Reject itsparseroption.Track files read by
mdincludeso Sphinx rebuilds them when they change.
Version 1.1.0 (2026-09-18)¶
Add the
m2r2.mdincludeSphinx extension. It provides themdincludedirective and leaves.mdfiles to another parser.
Version 1.0.1 (2026-09-18)¶
Keep underscores literal under
no_underscore_emphasiswith Mistune 3.3’s emphasis parser.Keep
_and*inside bare URLs and email addresses from being read as emphasis with Mistune 3.3.Render autolinks through a new
standalone_hyperlinkrenderer method.
Version 1.0.0 (2026-02-11)¶
Drop support for Python < 3.9.
Upgrade to Mistune 3.0+.
Rename the converter class to
M2R2, retainingM2Ras an alias.Deprecate Sphinx config
no_underscore_emphasisin favor ofm2r_no_underscore_emphasis.Support inline images, including images in table cells, using RST substitutions.
Render links and code inside emphasis independently to avoid unsupported nested RST markup.
Version 0.3.4 (2025-05-01)¶
Fixed dependencies errors
Version 0.3.3 (2022-08-11)¶
Drop support for all python versions prior to 3.7
Upgrade to docutils 0.19
Version 0.3.2 (2021-12-10)¶
Pin mistune version
Version 0.3.1 (2021-07-13)¶
Fix argparse for python3.10
Version 0.3.0 (2021-07-12)¶
Add support for mermaid code
Change bump for bump2version
Version 0.2.8 (2021-06-23)¶
Fix bug that made multiple inline mathematical expressions fail to render
Version 0.2.7 (2020-11-20)¶
Add official python3.9 support
Fix classifiers
Version 0.2.6 (2020-11-19)¶
Fix error for Sphinx3.3.0
Version 0.2.5 (2020-07-13)¶
Update repo name in every reference
Version 0.2.4 (2020-07-12)¶
Central versioning
Add bump
Version 0.2.3 (2020-07-09)¶
Change
toxfornoxAdd
pre-commithooks and fix styling
Version 0.2.1 (2018-10-12)¶
Add
--disable-inline-mathandm2r_disable_inline_mathsphinx option
Version 0.2.0 (2018-08-13)¶
Add
start-lineandend-lineoption tomdincludedirectiveAdd
anonymous_referencesoption (#26)
Version 0.1.15 (2018-06-30)¶
Support Sphinx’s doc/ref directives for relative links (#16)
Version 0.1.14 (2018-03-22)¶
Implement markdown link with title
Version 0.1.13 (2018-02-14)¶
Catch up sphinx updates
Version 0.1.12 (2017-09-11)¶
Support multi byte characters for heading
Version 0.1.11 (2017-08-30)¶
Add metadata for sphinx
Add
convert(src)function, which is shortcut ofm2r.M2R()(src)
Version 0.1.10 (2017-08-15)¶
Include CHANGES and test files in source distribution
Version 0.1.9 (2017-08-12)¶
Print help when input_file is not specified on command-line
Version 0.1.8 (2017-08-11)¶
Update metadata on setup.py
Version 0.1.7 (2017-07-20)¶
Fix undefined name error (PR #5).
Version 0.1.6 (2017-05-31)¶
Drop python 3.3 support
Improve image_link regex (PR #3)
Version 0.1.5 (2016-06-21)¶
Support multiple backticks in inline code, like:
backticks (``) in code
Version 0.1.4 (2016-06-08)¶
Support indented directives/reST-comments
Support role-name after backticks (
`text`:role: style)
Version 0.1.3 (2016-06-02)¶
Remove extra escaped-spaces (’\ ‘)
before and after normal spaces
at the beginning of lines
before dots
Version 0.1.2 (2016-06-01)¶
Add reST’s
::marker supportAdd options to disable emphasis by underscore (
_or__)
Version 0.1.1 (2016-05-30)¶
Fix Bug: when code or link is placed at the end of line, spaces to the next word is disappeared
Version 0.1 (2016-05-30)¶
First public release.