pypi / pymdown-extensions
pymdown-extensions
What changed in pymdown-extensions 10 to 13, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-20.
21 breaking3 security1 deprecations14 new APIs and options11 performance6 behavior and defaults28 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initpymdown-extensions 1333 changes
Breaking changes 8
Installs must require Python Markdown 3.10.3.
Affected extensions stop short of the recursion limit instead of raising a
RecursionError; content past the limit is no longer specially processed.When a URL responds with a 429, snippets use the server-requested delay instead of their backoff, and fail right away if that delay exceeds the longest they would wait themselves.
BetterEm, Tilde, Caret, and Mark apply the CommonMark rule of 3 so ambiguous closing delimiters can skip an incompatible opener and pair with an earlier one.
Generic mode is now the default; the script approach remains available with updated configuration for recent MathJax versions.
Bare HTTP, HTTPS, and www links follow GFM extended autolink rules for link boundaries and allowed preceding characters; short-host links are allowed.
At least Python Markdown 3.10.3 is now required for performance improvements.
Python 3.10 is dropped; Python >= 3.11.5 is required because possessive quantifiers are broken on lower versions.
Security 1
Non-generic mode escapes content in script to prevent a closing script tag from causing unintended behavior.
New APIs and options 2
A new API finds which lines are snippet notation so extensions can leave them alone.
A new overridable snippet-processing step lets extensions add notation or change included content.
Performance 5
Parsing very long runs of
;or-in content and very long snippet paths with line ranges no longer has quadratic time complexity.Improves performance of header patterns in Details, Admonitions, and SaneHeaders.
Improves performance of HTML patterns in Blocks.HTML.
Parsing many unclosed CriticMarkup openers now uses a linear-time scanner instead of a regular expression with quadratic or cubic time complexity.
Link and email patterns remove excessive backtracking to improve performance.
Fixes and other changes 17
Prevents text from being dropped when a stray delimiter that cannot open or close appears between delimiter pairs parsed together.
Prevents unused delimiters inside a parsed span from being reprocessed against later delimiter pairs and dropping or misplacing text.
Unusable delimiters dropped by another delimiter's region no longer leave stale space tracking that can reject valid pairs later.
Handles elements with unquoted attributes.
Generic mode output is fixed when tex_inline_wrap or tex_block_wrap contain braces.
Prevents a crash when a numbered caption is nested inside a figure not created by the caption block.
Fixes unwanted colon attributes with the
{: ...}syntax.Prevents text being dropped or misplaced when an unpaired
[precedes a span returned from the cache.Fixes callouts in indented blockquotes.
Keeps i and I in alphabetical lists after a blank line.
Fixes a regression related to unmatched opening and closing.
URLs with balanced parentheses or brackets no longer lose their closing character.
Fixes a crash on malformed 100 percent values such as
[=100,0%].Escaped section markers no longer start or end a section before its start.
Fixes a crash when strip_comments is disabled.
Fixes a crash when a subscript or superscript with no space allowed starts inside emphasis.
BetterEm, Tilde, Caret, and Mark handle placeholders better when evaluating CommonMark punctuation rules.
pymdown-extensions 1224 changes
Breaking changes 10
BetterEm was completely rewritten for CommonMark compliance; * and _ emphasis are handled together for more natural nesting, with improved performance and possible subtle differences from legacy behavior.
The new no_space option controls whether the Pandoc-style requirement of no unescaped spaces is enabled for superscript; it is enabled by default.
Insertions can occur mid-word by default; set smart_insert to enable the previous behavior that prevented them.
This deprecated Arithmatex option was removed; use arithmatex_fenced_format instead.
This deprecated Arithmatex option was removed; use arithmatex_inline_format instead.
Marking can occur mid-word by default; set smart_mark to enable the previous behavior that prevented it.
Emoji no longer supports the undocumented and deprecated old-style custom emoji index logic.
The new no_space option controls whether the Pandoc-style requirement of no unescaped spaces is enabled for subscript; it is enabled by default.
Deletion can occur mid-word by default; set smart_delete to enable the previous behavior that prevented it.
This deprecated Slugs method was removed; use the documented slugify method with appropriate arguments instead.
New APIs and options 6
Adds a punctuation option to disable CommonMark punctuation rules in BetterEm.
Highlight accepts a simple string or a dictionary with a title and title mode;
htmltreats the title as HTML, whiletextis the default.A new rule forces CommonMark punctuation rules.
SuperFences adds
title_modefor Pygments fenced blocks, allowing a title to be treated as HTML.Custom fences can specify an optional reset function.
A new extension allows creation of spans using Pandoc-style bracket notation.
Performance 1
Performance is improved for long invalid Tilde and Caret delimiters.
Behavior and default changes 5
Tilde and Caret disable CommonMark punctuation rules by default for backwards compatibility; the rules are honored again when subscript or superscript is disabled.
Blocks.Admonitions can handle headers specially in titles.
Blocks.Details can handle headers specially in titles.
Details can handle headers specially in titles.
Quotes can handle headers specially in callout titles.
Fixes and other changes 2
Official support is added for Python 3.15.
Fixes a case in BetterEm with new logic.
pymdown-extensions 1112 changes
Breaking changes 2
Python 3.9 is no longer supported.
Relative links are restricted to base_path by default.
Security 1
pymdown-extensions: exponential-backtracking ReDoS in caret, tilde, betterem, and magiclink inline processors
New APIs and options 2
Set restrict_path to False to disable the default restriction on relative links.
Specify a location different from base_path for restricting paths; it is also used as a relative base for image paths.
Performance 5
InlineHilite improves the performance of inline code matching.
Keys fixes inefficiencies in its regex pattern.
Fixes regex pattern inefficiencies in BetterEm.
Fixes regex pattern inefficiencies in Caret.
Fixes regex pattern inefficiencies in MagicLink.
Fixes and other changes 2
Blocks.HTML fixes backtracking in the HTML extension.
Fixes an exception caused by an empty title in Tabbed.
pymdown-extensions 1015 changes
Breaking changes 1
Twemoji is updated to use Unicode 16, changing the emoji set used by the extension.
Security 1
Fixes a directory traversal regression that could load a snippet outside the base path when restrict_base_path is enabled.
Deprecations 1
Critic
viewmode is deprecated; explicitly setmodetoacceptorrejectto avoid warnings or future issues.
New APIs and options 4
Caption now supports specifying classes and arbitrary attributes in addition to IDs.
Quotes optionally enables specifying callouts or alerts in the style used by GitHub and Obsidian.
A new blockquotes extension uses a more modern approach and does not group consecutive blockquotes together in the same lazy fashion as Python Markdown's default.
Caption block headers can specify static IDs using #id syntax.
Behavior and default changes 1
The deprecation of Critic's view mode is rolled back; further enhancements to this mode are not planned.
Fixes and other changes 7
Avoids passing a filename for code block titles of None, which latest Pygments versions cannot handle.
The first class for callouts, the alert type, is always rendered lowercase.
Fixes a matching pattern for Bitbucket repos.
Fixes nested math parsing when block $$ math is used inline within a paragraph.
importantis available as a default for Block Admonition.Blocks extensions better handle nesting of indented style Admonitions, Details, Tabbed, and other non-conflicting blocks.
Fixes an issue where Highlight can override another extension in Python Markdown’s registered list.