Adds dir="auto"
attribute to paragraphs,
This will help browser to set text direction based on the content of current paragraphs
pip install markdown-autodirection
text = "Text" from markdown import markdown html = markdown(text, extensions=['autodirection']) print(html) # <p dir="auto">Text</p>