◐ Shell
clean mode source ↗

GitHub - aliva/python-markdown-autodirection

Skip to content

Navigation Menu

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Python Markdown Auto Direction

pypi Build Status

Adds dir="auto" attribute to paragraphs, This will help browser to set text direction based on the content of current paragraphs

Install

pip install markdown-autodirection

Use

text = "Text"
from markdown import markdown
html = markdown(text, extensions=['autodirection'])
print(html)
# <p dir="auto">Text</p>