mdx-truly-sane-lists
Extension for Python-Markdown that makes lists truly sane. Custom indents for nested lists and fix for messy linebreaks.
What it is and what it does
mdx-truly-sane-lists is a Markdown extension that modifies how lists are rendered by the Python-Markdown library. It addresses two common frustrations: nested lists can be indented by a custom amount (defaulting to 2 spaces instead of the standard 4), and list items no longer generate spurious paragraph tags or unwanted line breaks when separated by blank lines. The extension inherits the sane_lists behavior, which prevents mixing ordered and unordered lists in the same block.
The package is a thin, focused extension with no dependencies beyond Markdown itself. It works by hooking into Markdown's list processing and adjusting indentation rules and paragraph handling. It has been stable since 2022 but is no longer actively maintained—the repository is not archived, but there have been no commits or releases for over a year.
Use it for:
- Rendering Markdown with nested lists that use 2-space indentation instead of 4-space code-block indentation.
- Preventing unwanted paragraph tags and extra line breaks when list items are separated by blank lines in source Markdown.
- Generating cleaner HTML from Markdown documents that mix lists with other content without list fusion artifacts.
- Static site generators or documentation tools that use Python-Markdown and need more predictable list formatting.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python-Markdown extension that fixes list rendering by allowing custom indentation for nested lists and preventing unwanted paragraph tags and line breaks within list items.
Yes, if you need custom nested-list indentation or cleaner list rendering in Python-Markdown and accept the maintenance risk. The package is stable and has no known vulnerabilities, but it is abandoned—no updates will be released for compatibility issues with future Markdown or Python versions. Suitable for established projects with stable dependencies; risky for new projects expecting long-term support.
Install
mdx-truly-sane-lists on PyPI
pip
pip install mdx-truly-sane-listsuv
uv add mdx-truly-sane-listspoetry
poetry add mdx-truly-sane-listsInstalling mdx-truly-sane-lists
Before you install
Low friction: pure Python wheel with a single runtime dependency on Markdown. However, the package is abandoned—last release was 2022-07-19 and no commits since 2023-08-08. It remains functional but will not receive bug fixes or updates.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions. No licensing concerns for adoption.
Quickstart
from markdown import markdown
markdown(text='- item\n - nested', extensions=['mdx_truly_sane_lists'])
Verify before relying
- Whether the package remains compatible with current Markdown versions and modern Python releases beyond those listed in classifiers.
- Whether the abandoned status poses any practical risk for typical Markdown list processing workflows.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — Markdown |
| Maintenance | abandoned — 1,487 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,385,543/month — #3,976 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mdx_truly_sane_lists-1.3-py3-none-any.whl
Keywords: markdown extension, markup, lists, markdown
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pymdown-extensionsPymdown Extensions provides a collection of…
permissive · top 1,000 on PyPI
mdformat-mkdocsAn mdformat plugin that formats Markdown for…
permissive · top 15,000 on PyPI
markdown-includeAdds an include directive to Python-Markdown…
copyleft · top 15,000 on PyPI
markdownlitExtends Streamlit's markdown rendering with…
permissive · top 15,000 on PyPI
mdformat_deflistExtends mdformat with support for parsing and…
permissive · top 15,000 on PyPI
MarkdownConverts Markdown text to HTML using a Python…
permissive · top 1,000 on PyPI
python-markdown-mathAdds support for rendering mathematical…
permissive · top 15,000 on PyPI
markoMarko is a pure Python markdown parser that…
permissive · top 5,000 on PyPI
sphinx-markdown-tablesAdds markdown table support to Sphinx…
copyleft · top 15,000 on PyPI
pptx2mdConverts PowerPoint .pptx files to markdown,…
permissive · top 15,000 on PyPI