Registry / web-framework / pymdown-extensions

pymdown-extensions

JSON →
library11.0.2pypypi✓ verified 27d ago

Pymdown Extensions is an extension pack for Python Markdown, offering a comprehensive collection of features to enhance Markdown rendering. It provides over 30 extensions for capabilities such as enhanced code blocks with highlighting, content tabs, emoji support, and mathematical notation. Currently at version 10.21.2, the library is actively developed with a consistent release cadence.

pip install pymdown-extensions
INSTALL
IMPORT
SIG · PYMDOWN-EXTENSIONS
P
pymdown-extensions
web-frameworkpythonv11.0.2
Install
2.1s avg
Import
138ms
Disk
23MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v11.0.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.138s · 25.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.1s · import 0.138s · 26MB
23MB installed
● package 23MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Markdown
from markdown import Markdown
import markdown

Initialize a Markdown converter with `pymdown-extensions` by listing their names (e.g., `pymdownx.superfences`, `pymdownx.highlight`) in the `extensions` argument. The example demonstrates basic Markdown conversion with code block highlighting and emoji support.

import markdown md_text = ''' # Hello Pymdown! This is a simple markdown with `inline code`. ```python # SuperFences and Highlight example def greet(name): print(f"Hello, {name}!") greet("World") ``` ''') # To use Pymdown Extensions, pass their names (prefixed with 'pymdownx.') # to the 'extensions' argument of markdown.Markdown. # 'superfences' allows nested code blocks, and 'highlight' provides syntax highlighting. html = markdown.Markdown( extensions=[ 'pymdownx.superfences', 'pymdownx.highlight', 'pymdownx.emoji' ] ).convert(md_text) print(html)
Debug
Known issues
breakingThe 'Critic' extension's `view` mode was deprecated in version 10.18 and is slated for future removal. Users should explicitly set `mode` to either `accept` or `reject` to avoid warnings and ensure future compatibility.
fix
Update Critic extension configuration to use `mode: accept` or `mode: reject` instead of `view`.
affects: >=10.18
gotchaThe 'Highlight' extension, prior to version 10.21.2, had issues handling `None` as a filename for code block titles, leading to potential errors with newer Pygments versions.
fix
Upgrade to version 10.21.2 or later. Ensure a string is always provided for `filename` if custom titles are used.
affects: <10.21.2
gotchaThe new 'Quotes' extension (introduced in 10.20) handles blockquote grouping differently than Python Markdown's default, following a more modern parsing approach. This may change expected behavior if migrating from the default blockquote parsing.
fix
Review documentation for the 'Quotes' extension, especially regarding its grouping behavior, and adjust content or expectations if coming from Python Markdown's default blockquote parsing.
affects: >=10.20
gotchaA bug in 'Arithmatex' prior to 10.19.1 could cause incorrect parsing of block math (`$$`) when used inline within a paragraph, resulting in nested math parsing issues.
fix
Upgrade to version 10.19.1 or later to resolve the nested math parsing issue.
affects: <10.19.1
breakingThe test script (`/script.py`) encountered a Python `SyntaxError: unmatched ')'`, indicating an issue with the script's syntax rather than a direct library behavior. This prevents the library from being effectively tested.
fix
Correct the Python syntax error in `/script.py` (specifically, the unmatched parenthesis on line 15) to allow the test to proceed and evaluate the library functionality.
affects: N/A
Upgrade
Version history
11.0.2latest on PyPI · released Aug 22, 2026
Audit
Dependencies
markdownrequiredCore dependency for parsing Markdown.
PygmentsoptionalRequired for the 'highlight' extension's syntax highlighting capabilities.
Agent activity
22 hits · last 30 days
node
18
OpenAI (training)
2
Resources
pymdown-extensions — pip install pymdown-extensions · libregistry