Extension for Python-Markdown that makes lists truly sane. Custom indents for nested lists and fix for messy linebreaks.
Project description
Mdx Truly Sane Lists
An extension for Python-Markdown that makes lists truly sane. Features custom indents for nested lists and fix for messy linebreaks and paragraphs between lists.
Features
-
nested_indent
option: Custom indent for nested lists. Defaults to2
. Doesn't mess with code indents, which is still 4. -
truly_sane
option: Makes linebreaks and paragraphs in lists behave as usually expected by user. No longer adds weirdp
, no extra linebreaks, no longer fuses lists together when they shouldn't be fused (see screenshots and examples below). Defaults toTrue
. -
Inherits sane lists behavior, which doesn't allow the mixing of ordered and unordered lists.
Installation
Pypi:
pip3 install mdx_truly_sane_lists
Directly from git:
pip3 install git+git://github.com/radude/mdx_truly_sane_lists
Usage
Basic:
from markdown import markdown
# Default config is truly_sane: True, nested_indent: 2
markdown(text='some text', extensions=['mdx_truly_sane_lists'])
With explicit config:
from markdown import markdown
markdown(text='some text',
extensions=[
'mdx_truly_sane_lists',
],
extension_configs={
'mdx_truly_sane_lists': {
'nested_indent': 2,
'truly_sane': True,
}},
)
Screenshots and examples
You can preview the new behaviour live at rentry.co (uses nested_indent: 2, truly_sane: True
)
Some ugly screenshots because I'm lazy and cannot into gimp:
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mdx_truly_sane_lists-1.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a7f698958f7b92d153cc25b20c20ba111fd2655a4c3c630d336e46b78ff9399 |
|
MD5 | cbdfa75e4f682eee7e853211c3760aff |
|
BLAKE2b-256 | a95dc76eb86c5af9af08c17606f472a3bb666434d2d40b7c3e5503aa7d7f239b |
Hashes for mdx_truly_sane_lists-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e97d1ba605b4b56ab064daac7bbcd1d766023879460dda6b84b3385813e9b09 |
|
MD5 | 1fa0f262395481d717b250287018e9a5 |
|
BLAKE2b-256 | 8f337949856db297f013d561d2d036fc3f50d9aa3b977ec76cb6ef9e46c75b2e |