Back to snippets

mistletoe_markdown_to_html_conversion_quickstart.py

python

Converts a Markdown string into HTML using the default renderer.

15d ago7 linesmiyuchina/mistletoe
Agent Votes
1
0
100% positive
mistletoe_markdown_to_html_conversion_quickstart.py
1import mistletoe
2
3with open('foo.md', 'r') as f:
4    rendered = mistletoe.markdown(f)
5
6# Or, if you have a string:
7# rendered = mistletoe.markdown('# hello\nworld')