NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #767 most downloaded on PyPI
Extension pack for Python Markdown.
Latest stable
13.1
Last release 11 days ago
11 Nov 2026
Ships fairly regularly
a new release about every 4 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
128 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
NEW: Snippets: Respect the Retry-After header when a URL responds with a 429. The server's requested delay is used instead of our backoff, and the sni
Retry-After header when a URL responds with a 429. The server's requested delay is
used instead of our backoff, and the snippet fails right away if it is longer than the longest we would wait
ourselves (backoff_factor times max_retries).parse_snippet_target,
select_snippet_lines, and process_snippet_lines) to add notation or change included content, and add
get_syntax_mask to find which lines are snippet notation so they can be left alone. (#3040); or - in content, and very long
snippet paths with line ranges.RecursionError. This includes content
nested inside of a document structure that is already deep, such as a quote or tab inside of many nested lists.
Content past the limit is no longer specially processed (Snippets skips includes past the limit, as it does for
cyclic includes).BREAK: Arithmatex: Generic mode is now the default mode as the old MathJax script approach has not been supported in MathJax for a long time now. We s
Your coding agent can read these notes before it upgrades. Set up the MCP server →
</script> from causing
unintended behavior. Guidance on configuration for non-generic mode has been updated in the documentation.http://, https://, and www. links now follow GFM's extended autolink rules for what
is considered the end of a link (trailing punctuation, entities, unbalanced ) and ]) and what a link can follow.
Links no longer start after arbitrary punctuation (quotes are still allowed), and http://host style links with a
short host are allowed.generic mode output when tex_inline_wrap or tex_block_wrap contain braces.i and I in alphabetical lists after a blank line.{: ...} syntax.strip_comments is disabled.100 percent values like [=100,0%].[ precedes a span that is returned from
the cache, e.g. [[]{#a}[b[]{#c}.__[A](u){target="_blank"}__: x.***l* * **e**.*a ~b~* with delete disabled.NEW: BetterEm: Expose a way to disable CommonMark punctuation rules in BetterEm if desired via a new punctuation option.
punctuation option.NEW: Add official support for Python 3.15.
punctuation
rule has been added to force CommonMark rules. When done, people will need to be aware of punctuation when subscript
or superscript is enabled and escape any that violates CommonMark rules.auto_title_map specifying the title as a simple string or a
dictionary containing the title and the title mode: either text or html, with text being the default. This
allows a title to be specified and treated as HTML when the mode is html.title_mode option for Pygments fenced blocks that allows a user to specify a title
to be treated as HTML via title_mode="html".NEW: SuperFences: Add optional reset function that can be specified for custom fences.
reset function that can be specified for custom fences.FIX: BetterEm: fix a case with new logic.
NEW: Arithmatex: Remove deprecated inline_mathjax_preview_format, inline_mathjax_format, and inline_generic_format. Use arithmatex_inline_format inste…
BREAK: BetterEm: Complete rewrite. There may be some subtle differences between legacy behavior and new CommonMark behavior.
* and _ emphasis are handled at the same time to provide more natural nesting.BREAK: Tilde, Caret, Mark: Rewritten and now built upon the latest BetterEm logic.
smart_delete,
smart_insert, or smart_mark, respectively, to enable previous behavior, which prevented mid-word deletion.no_space to control whether the Pandoc style requirement of "no unescaped
spaces" is enabled for subscript and superscript, respectively. no_space is enabled by default.NEW: Details, Blocks.Details, Blocks.Admonitions: Allow and handle headers specially in titles.
NEW: Quotes: Allow and handle headers specially in callout titles.
NEW: BracketSpan: New extension that allows for the creation of spans using a Pandoc style bracket notation.
NEW: Arithmatex: Remove deprecated inline_mathjax_preview_format, inline_mathjax_format, and
inline_generic_format. Use arithmatex_inline_format instead.
NEW: Arithmatex: Remove deprecated fence_mathjax_preview_format, fence_mathjax_format, and
fence_generic_format. Use arithmatex_fenced_format instead.
NEW: Emoji: Remove undocumented and deprecated "old style" custom emoji index logic.
NEW: Slugs: Remove deprecated uslugify, uslugify_encoded, uslugify_cased, uslugify_cased_encoded, gfm,
and gfm_encoded. Use the documented slugify method with appropriate arguments instead.
FIX: InlineHilite: Improve performance of inline code matching.
FIX: BetterEm: Fix regex pattern inefficiencies.
BREAK: B64: Restricts relative links to base_path by default. Can be disabled by setting new restrict_path option to False. The new root_path can be s
base_path by default. Can be disabled by setting new restrict_path
option to False. The new root_path can be specified if paths are desired to be restricted to a different
location separate base_path which is also used as a relative base for image paths.FIX: Fix regression that allows a snippet to be loaded outside of the base path using directory traversal when restrict_base_path is enabled (the defa
restrict_base_path is enabled (the default). Found by @gistrec.FIX: Highlight: Latest Pygments versions cannot handle a "filename" for code block titles of None.
None.FIX : Highlight: Latest Pygments versions cannot handle a "filename" for code block titles of None .
None.FIX : Quotes: Ensure the first class for callouts (the alert type) is always rendered lowercase.
NEW: Quotes: New blockquotes extension added that uses a more modern approach when compared to Python Markdown's default. Quotes specifically will not
NEW: Quotes: New blockquotes extension added that uses a more modern approach when compared to Python Markdown's default. Quotes specifically will not group consecutive blockquotes together in the same lazy fashion that the default Python Markdown does which follows a more modern trend to how parsers these days handle block quotes.
In addition, Quotes also provides an optional feature to enable specifying callouts/alerts in the style used by GitHub and Obsidian.
FIX: Arithmatex: Fix issue where block $$ math used inline within a paragraph could result in nested math parsing.
$$ math used inline within a paragraph could result in nested math
parsing.NEW: Critic: Roll back view mode deprecation as some still like to use it, though further enhancements to this mode are not planned.
view mode deprecation as some still like to use it, though further enhancements to this
mode are not planned.NEW: Critic: view mode has been deprecated. To avoid warnings or future issues, explicitly set mode to either accept or reject. In the future, the new…
view mode has been deprecated. To avoid warnings or future issues, explicitly set mode to
either accept or reject. In the future, the new default will be accept and the view mode will be removed
entirely.important should have always been available as a default.FIX: Blocks: Blocks extensions will now better handle nesting of indented style Admonitions, Details, and Tabbed and other non-conflicting blocks.
FIX: Fix an issue where Highlight can override another extension in the "registered" list in Python Markdown.
NEW: Allow specifying static IDs in caption block headers via #id syntax.
#id syntax.FIX: Inefficient regular expression pattern for figure caption numbers.
NEW: Add early support for Python 3.14.
max_retries and backoff_retries options to configure new retry logic for HTTP 429
errors (Too Many Requests client error).NEW: SuperFences: Add relaxed_headers option which can tolerate bad content in the fenced code header. When enabled, code blocks with bad content in t
relaxed_headers option which can tolerate bad content in the fenced code header. When
enabled, code blocks with bad content in the header will likely still convert into code blocks, often respecting
the specified language.combine_header_slug was enabled and there was no
header.FIX: Blocks: An empty, raw block type should not cause an error.
FIX: Blocks: Fix some corner cases with md_in_html.
md_in_html.FIX: MagicLink: Ensure that repo names that start with . are handled correctly.
. are handled correctly.. or ).NEW: Blocks.HTML: Add new custom option to specify tags and the assumed handling for them when automatic mode is assumed. This can also be used to ove
custom option to specify tags and the assumed handling for them when automatic mode
is assumed. This can also be used to override the handling for recognized tags with automatic handling.NEW: Snippets: Allow multiple line numbers or line number blocks separated by ,.
,.NEW: Blocks: Blocks extensions no longer considered in beta.
pymdownx.blocks.details approach.pymdownx.blocks.tab approach.strict option that will raise an exception if an emoji is used whose name has changed,
removed, or never existed.FIX: SuperFences: Fix a regression where certain patterns could cause a hang.
Fix: SuperFences: Fix regression where an omitted language in conjunction with options in the fenced header can cause a fence to not be parsed.
NEW: SuperFences: Allow fenced code to be parsed in the form `lang {.class #id} .
```lang {.class #id}.FIX: BetterEm: Add better support for *em, em,strong* and _em, __em,strong___ cases.
*em, **em,strong*** and _em, __em,strong___ cases.*sup, **sup,ins***.*sub, **sub,del***.FIX: FancyLists: Remove a mistaken semicolon from injected classes.
NEW: MagicLink: Change social links to support x instead of twitter. twitter is still recognized but is now deprecated and will be removed at a future…
x instead of twitter. twitter is still recognized but is
now deprecated and will be removed at a future time.urlunparse.NEW: Officially support Python 3.13.
FIX: Snippets: Fix snippet line range with a start of line 1.
NEW: Require Python Markdown 3.6+.
FIX: SmartSymbols: Ensure symbols are properly translated in table of content tokens.
NEW: Emoji: Update Twemoji and Gemoji data to latest.
:octocat:
are no longer resolved.default_lang which will cause code blocks with no language specifier to be
highlighted with the specified default language instead of plain text. This affects indented code blocks and code
blocks defined with SuperFences.style_plain_text can be specified with a language string (in addition to its previous
boolean requirement) to treat inline code blocks with no explicit language specifier with a specific default
language.NEW: MagicLink: Allow configuring custom repository providers based off the existing providers.
NEW: Blocks: Admonitions and Details now allow configuring custom block classes and default titles.
NEW: Snippets: Allow PathLike objects for base_path to better support interactions with MkDocs.
base_path to better support interactions with MkDocs.FIX: SuperFences: Fix an issue where braces were not handled properly in attributes.
NEW: Officially support Python 3.12.
## 10.2.1 - FIX: Tabbed: Fix regression.
NEW: Highlight: Add new stripnl option to configure Pygments' default handling of stripping leading and and trailing new lines from code blocks. Mainl
stripnl option to configure Pygments' default handling of stripping leading and
and trailing new lines from code blocks. Mainly affects fenced code blocks.NEW: Add new combine_header_slug option in legacy Tabbed extension and new Block Tab extension that will prefix a content tab's slug with the parent h
combine_header_slug option in legacy Tabbed extension and new Block Tab extension that will
prefix a content tab's slug with the parent header's slug. This allows for content tab slugs that are scoped to the
header they are under.FIX: Regression related to snippets nested deeply under specified base path.
Break: Snippets: snippets will restrict snippets to ensure they are under the base_path preventing snippets relative to the base_path but not explicit
base_path preventing snippets
relative to the base_path but not explicitly under it. restrict_base_path can be set to False for legacy
behavior.NEW: Emoji: Update to new CDN and use Twemoji 14.1.2.
NEW: Blocks: Add new experimental general purpose blocks that provide a framework for creating fenced block containers for specialized parsing. A numb
- and _.check_paths is enabled, and a specified section is not found, raise an error.dedent_sections that will de-indent (remove any common leading
whitespace from every line in text) from that block of text.NEW: Blocks: Add type_multi and type_none validators.
type_multi and type_none validators.on_validate and pass in parent element as context for validation.raw mode, allow content to be indented to avoid conflicts with HTML parser. raw
blocks should be indented and are now documented as such. The results will be dedented up to Python Markdown's tab
length, so intentional indentation is still possible. raw blocks with no indentation will still work, but may have
conflicts with other extensions.NEW: Blocks: Add on_inline_end event.
on_inline_end event.NEW: Blocks: Ensure inline mode is handled properly.
inline specifier instead of span.NEW: Blocks: Add new experimental general purpose blocks that provide a framework for creating fenced block containers for specialized parsing. A numb
- and _.check_paths is enabled, and a specified section is not found, raise an error.dedent_sections that will de-indent (remove any common leading
whitespace from every line in text) from that block of text.NEW: HTML General block now accepts Emmet style attribute: /// html | div.class#id[name=value].
/// html | div.class#id[name=value].attributes to attrs.colon_syntax option and cement that we are using /// format moving forward.NEW: General blocks now use an indented option block right after the header. yaml_indent option has been removed.
yaml_indent option has been
removed.NEW: General blocks no longer use YAML fences for per block options, but instead use a special token to denote the line is part of the config.
yaml_indent to control whether per-block YAML configs use indentation or a
leading special character: / for /// syntax and : for ::: syntax (colon_syntax must be true to use :::
syntax)./ character can be escaped when registering the blocks extension.One column per quarter.