pypi / markdown
markdown
What changed in markdown 3, from its official release notes, upgrade guides and advisories. Also covers types-markdown. Sources checked 2026-11-25.
5 breaking1 security8 performance2 behavior and defaults17 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initmarkdown 333 changes
Breaking changes 5
Python 3.15 is officially supported, and Python 3.10 support is dropped.
The Setext header processor no longer accepts headers with mixed
=and-characters.PyPy 3.11 is officially supported, and PyPy 3.9 support is dropped.
Python 3.14 is officially supported, and Python 3.9 support is dropped.
The default is reverted to True because the experimental behavior introduced in 3.9.0 produced inconsistent results.
Security 1
Attribute names are sanitized so they cannot break out of their tag and inject markup.
Performance 8
Regex backtracking no longer takes quadratic time for an unclosed block attribute list followed by many spaces.
Parsing many consecutive footnote definitions no longer takes quadratic time.
Regex backtracking no longer takes quadratic time when a long run of
#characters is followed by more text.Documents with many unclosed HTML comments no longer trigger quadratic-time processing.
Parsing many consecutive reference definitions no longer takes quadratic time.
ID generation no longer takes quadratic time when many headers share the same text.
Inline processors resume searching after the previous match, improving performance for repeated inline patterns.
Fixes quadratic-time regex backtracking when a link reference definition has no URL and has many trailing spaces.
Behavior and default changes 2
Automatic links now support URL schemes beyond HTTP and FTP, such as ssh.
Enforcement of CommonMark style punctuation rules is reverted for backwards compatibility.
Fixes and other changes 17
Attributes without values are preserved as provided instead of rendering as
key="key", keeping HTML and XHTML output consistent.Text is no longer lost when opening and closing backticks do not match.
The language name is escaped in non-Pygments output, matching Pygments output.
Abbreviations with empty definitions after inline elements are ignored consistently with those before inline elements.
Long chains of tokens are now handled correctly by new emphasis handling.
Complete HTML tags containing quoted
>characters are stripped from labels and generated heading IDs.Inline HTML attributes containing
<or>are no longer rejected.Emphasis handling was reworked to improve handling of nested emphasis.
Raw HTML comments inside an inline HTML element that closes in the same paragraph no longer split the paragraph.
An unterminated end tag such as
</foono longer causes all remaining content to be dropped.Removing Abbreviations no longer raises an error.
Fixes excessive regex backtracking when matching inline code blocks.
The extension now honors tags added to Markdown.block_level_elements after the extension is loaded.
Makes handling of
</more reliable.Fixes a regression related to comment handling.
Nested elements inside inline comments are now properly unescaped.
Handling bogus, unclosed, or bad HTML comments no longer causes an infinite loop.