NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #348 most downloaded on PyPI
Collection of plugins for markdown-it-py
Latest stable
0.7.0
Last release 12 days ago
10 Nov 2026
Ships fairly regularly
a new release about every 6 months
Most releases are documented
notes for 20 of 23 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
23 releases · first in 2020
Drag across the ruler to compare, or tap a release to open it.
A security and bug-fix release. Plugin renderers now escape user content in HTML attribute, label and math positions, attrs drops event-handler attrib
A security and bug-fix release.
Plugin renderers now escape user content in HTML attribute, label and math positions,
attrs drops event-handler attributes by default and validates URL-valued attributes,
and the regular expressions in texmath ```math blocks and admon headers no longer backtrack polynomially (#143).
It also fixes parser hangs in gfm_autolink (#160) and texmath (#156),
and adds the section_ref plugin.
The release requires markdown-it-py >= 3.0 and supports Python 3.10 to 3.14.
Several fixes change rendered output: see Upgrade notes below.
subscript with markdown-it-py 2.x.section_ref, gfm and gfm_autolink still need markdown-it-py >= 4.1 and raise RuntimeError on older versions.attrs_plugin / attrs_block_plugin defaults are stricter (#150).allowed list, event-handler attributes (any key starting with on, in any case) are removedtoken.meta["insecure_attrs"]; style is kept.allowed says, href, src, action, formaction and xlink:href are removed when md.validateLink rejects their value,[a](https://x){href="javascript:alert(1)"} keeps href="https://x".[text]{...}) now honour allowed, which they used to bypass.allowed=("id", "class").texmath default renderer HTML-escapes the math source ($a<b$ now renders <eq>a<b</eq>),dollarmath equation label, the myst_block target label, the colon_fence class nametasklists label_after label are escaped too.&, <, > or " in these positions is now emitted as entities.anchors_plugin ids can change (#159).{#custom} from attrs_block_plugin) is now kept instead of being overwritten,github_slugify:# Foo  now gives foo-, it was foo).slug_func=lambda title: slugify(title.strip()), with slugify from mdit_py_plugins.anchors.index.mdit_py_plugins.attrs.parse.parse() raises on an unterminated attribute group, instead of succeeding at the end of the string`a`{.a now renders <code>a</code>{.a; it used to drop the {.a.section_ref token shape is public API (#169): see its entry below.Thanks to @KrisKennawayDD for reporting these issues in #143,
and to @KyleKing for the ReDoS analysis and fixes.
🔒 FIX: Escape plugin renderer output and harden the attrs defaults, thanks to @KyleKing for the cross-plugin XSS test (#150, folding in #151)
With markdown-it-py's html option off, untrusted Markdown could still inject HTML or script through:
the texmath default renderer (math source), the dollarmath equation label (id and permalink href),
the myst_block (name)= target label, and attrs / attrs_block event-handler and javascript: URL attributes.
All of these are now escaped or filtered (see Upgrade notes),
and tests/test_xss.py renders injection probes through each plugin's default renderer.
🔒 FIX: Escape the colon_fence class name and the tasklists label_after label (#165)
:::a"onmouseover="alert(1) rendered an attribute-breaking class="block-a"onmouseover="alert(1)",
and - [ ] <img src=x onerror=alert(1)> with label=True, label_after=True rendered a raw <img>.
🔒 FIX: ReDoS in texmath ```math blocks and admon headers, thanks to @KyleKing (#148)
The texmath ```math patterns (the gitlab and julia delimiters) backtracked cubically
on a fence followed by a long whitespace run with no closing fence,
and the admon multi-tag title pattern backtracked quadratically on a header with a long run of spaces or double quotes.
Both now run in linear time and match what they matched before, so output is unchanged.
✨ NEW: Add the section reference plugin (section_ref) (#144, #168, #169)
The section_ref plugin captures section-sign references, the syntax LLMs
commonly use to point at numbered headings, into dedicated section_ref tokens,
so downstream renderers (e.g. MyST-Parser) can resolve them to heading cross-references:
See §1, §1.1 and §2.3.4 for details.A § must be immediately followed by one or more .-separated levels of 1 to 9 ASCII digits, with no spaces.
A trailing . is not part of the reference, and a reference directly followed by an ASCII letter (§1a),
or with a level longer than nine digits, stays literal text.
Each reference is a section_ref leaf token whose content is the text as written
and whose meta["numbers"] lists each level as an int (e.g. [1, 1] for §1.1).
The grammar and the token shape are documented in the plugin docstring and are public API from this release.
It renders as <span class="section-ref">§1.1</span> by default.
Requires markdown-it-py >= 4.1.0.
🐛 FIX: gfm_autolink no longer hangs on autolink-like text in link labels (#160), thanks to @AryanRG (#161)
🐛 FIX: texmath no longer loops forever on block math opened in a blockquote and closed after it (#156), thanks to @acaprino (#157)
🐛 FIX: dollarmath: a same-line $$…$$ followed by text no longer swallows the following lines (#147), thanks to @KyleKing (#149)
🐛 FIX: dollarmath: multi-line $$ blocks in a blockquote no longer keep the > prefixes in their content (#125), thanks to @BetterAndBetterII (#152)
🐛 FIX: front_matter: parse front matter closed by the YAML ... document-end marker, thanks to @feiiiiii5 (#158)
A block closed by ... used to leak into the document as text when the ... was the document's last line or had trailing spaces,
and otherwise kept the ... in token.content.
The marker must be at column 0 and may be followed by spaces only.
🐛 FIX: footnote: reserve an inline footnote's id before parsing its content, thanks to @civilwarinfrance (#162)
A [^named] reference or a nested ^[...] inside an inline footnote no longer loses the inner note, duplicates an id, or raises KeyError: 'count'.
🐛 FIX: anchors: keep explicit heading ids, and do not strip slug titles, thanks to @muneikh (#159)
🐛 FIX: attrs: unterminated groups, class accumulation and closing-token merge (#153)
An unterminated attribute group no longer swallows the text after it.
Classes from adjacent attribute groups are combined on spans and links ([a]{.x}{.y} gives class="x y"),
as they already were on inline code and images.
An attributes block at the end of a container is no longer merged onto the closing token
(> {.a} rendered </blockquote class="a">).
🐛 FIX: myst_role no longer rejects a role at the start of inline content when the content ends with a backslash,
and \\{name}`x` (an escaped backslash before a role) now parses the role (#62) (#145)
dollarmath rendering contract and a "Rendering dollarmath output" guide (#111),python -m build and checked on every pull request (#164)Full Changelog: v0.6.1...v0.7.0
Full changelog: v0.6.1...v0.7.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
🐛 FIX: Nested field lists incorrectly nesting inside parent containers by @chrisjsewell in #139
Full Changelog: v0.6.0...v0.6.1
🐛 FIX: Nested field lists incorrectly nesting inside parent containers (#139)
Field lists inside list items (or other indented containers) would recursively nest each field inside the previous one, instead of being siblings.
🔧 Add AGENTS.md and copilot-setup-steps workflow by @Copilot in #132
Full Changelog: v0.5.0...v0.6.0
✨ NEW: Add GFM autolink and composite GFM plugins (#135)
The gfm_autolink plugin implements GFM autolink literals,
auto-linking URLs and email addresses without requiring angle brackets:
Visit www.example.com or contact user@example.com
The gfm composite plugin enables a full Github Flavored Markdown (GFM)-like configuration in a single call
(tables, strikethrough, autolinks, task lists, alerts, and footnotes).
See the GitHub docs for more information.
Requires markdown-it-py >= 4.1.0.
✨ NEW: Add superscript plugin and tests, thanks to @elijahgreenstein (#128)
Ported from markdown-it-sup.
Renders superscript text using ^..^ syntax:
29^th^ of May
✨ NEW: Add plugin & tests to render subscripts by @miteshashar in #122
Full Changelog: v0.4.2...v0.5.0
👌 Improve parsing of nested amsmath by @chrisjsewell in #119
allowed option for inline/block attributes by @joker21663 in #115Full Changelog: v0.4.1...v0.4.2
👌 Improve parsing of nested amsmath
The previous logic was problematic for amsmath blocks nested in other blocs (such as blockquotes)
The new parsing code now principally follows the logic in markdown_it/rules_block/fence.py
(see also https://spec.commonmark.org/0.30/#fenced-code-blocks),
except that:
✨ Add allowed option for inline/block attributes
The allowed option accepts a list of allowed attribute names.
If not None, any attributes not in this list will be removed
and placed in the token's meta under the key "insecure_attrs".
👌 Expand support for Python-Markdown in the admon plugin by @KyleKing in #94
👌 Expand support for Python-Markdown in the admon plugin by @KyleKing in #94
👌 Add option for footnotes references to always be matched by @chrisjsewell in #108
🔧 Export plugins explicitly with __all__ by @llimllib in #91
🔧 Use ruff-format by @chrisjsewell in #107
🧪 Test against 3.12 by @chrisjsewell in #109
Full Changelog: v0.4.0...v0.4.1
👌 Add option for footnotes references to always be matched
Usually footnote references are only matched when a footnote definition of the same label has already been found. If always_match_refs=True, any [^...] syntax will be treated as a footnote.
⬆️ UPGRADE: Drop python 3.7 and support 3.11
⬆️ UPGRADE: Drop python 3.7 and support 3.11 (#77)
⬆️ UPGRADE: Allow markdown-it-py v3 (#85)
state.srcCharCode -> state.src (#84)code block rule in markdown-it-py v3+ will now allow all syntax blocks to be indented by any amount of whitespace.👌 Improve dollarmath plugin: Add allow_blank_lines option, thanks to @eric-wieser (#46)
👌 Improve admon plugin: Add ??? support, thanks to @KyleKing (#58)
🔧 MAINTAIN: Make type checking strict (#86)
Full Changelog: v0.3.5...v0.4.0
🐛 FIX: Regression in dollarmath by @chrisjsewell in #69
Full Changelog: v0.3.4...v0.3.5
✨ NEW: Add attrs_block_plugin by @chrisjsewell in #66
Full Changelog: v0.3.3...v0.3.4
🐛 FIX: attrs: span with end of inline before attrs by @chrisjsewell in #57
Full Changelog: v0.3.2...v0.3.3
🔧 MAINTAIN: Fix pre-commit configuration by @hukkin in https://github.com/executablebooks/mdit-py-plugins/pull/54
admon plugin by @KyleKing in https://github.com/executablebooks/mdit-py-plugins/pull/53Full Changelog: https://github.com/executablebooks/mdit-py-plugins/compare/v0.3.1...v0.3.2
admon plugin by @KyleKing (#53)Full Changelog: v0.3.1...v0.4.0
🔧 MAINTAIN: Remove upper bound from Python version constraint by @cjolowicz in https://github.com/executablebooks/mdit-py-plugins/pull/40
attrs_plugin by @chrisjsewell in https://github.com/executablebooks/mdit-py-plugins/pull/50Full Changelog: https://github.com/executablebooks/mdit-py-plugins/compare/v0.3.0...v0.3.1
attrs_plugin👌 IMPROVE: AMSmath defaut HTML tags by @rowanc1 in https://github.com/executablebooks/mdit-py-plugins/pull/27
Full Changelog: https://github.com/executablebooks/mdit-py-plugins/compare/v0.2.8...v0.3.0
v2.math_block_eqno -> math_block_label tokenSee CHANGELOG.md
See CHANGELOG.md
See CHANGELOG.md
wordcount_plugindollarmath: Allow inline double-dollarmyst_blocks: Parse multiline commentsenv as an AttrDictfront_matter: don't duplicate content storage in Token.meta👌 IMPROVE: Remove direct use of Token.attrs
👌 IMPROVE: Remove direct use of Token.attrs
🐛 FIX: front-matter: IndexError if first line is single dash
🐛 FIX: front-matter: IndexError if first line is single dash
Nothing published for this version
Nothing published for this version
✨ NEW: Add substitution_plugin (improvements in 0.2.3 and 0.2.4)
✨ NEW: Add substitution_plugin (improvements in 0.2.3 and 0.2.4)
Nothing published for this version
Add mypy type-checking, code taken from: https://github.com/executablebooks/markdown-it-py/commit/2eb1fe6b47cc0ad4ebe954cabd91fb8e52a2f03d
Add mypy type-checking, code taken from: https://github.com/executablebooks/markdown-it-py/commit/2eb1fe6b47cc0ad4ebe954cabd91fb8e52a2f03d
First release, code taken from: https://github.com/executablebooks/markdown-it-py/commit/3a5bdcc98e67de9df26ebb8bc7cd0221a0d6b51b
First release, code taken from: https://github.com/executablebooks/markdown-it-py/commit/3a5bdcc98e67de9df26ebb8bc7cd0221a0d6b51b
One column per quarter.