文檔: https://daringfireball.net/projects/markdown/ Github: https://github.com/Python-Markdown/markdown/ John Gruber’s Markdown: https://python-markdown.github.io/reference/ 安裝
pip install markdown
markdown轉html示例
import markdown
md = """
# 标題
- list-1
- list-2
"""
html = markdown.markdown(md)
print(html)
"""
輸出:
<h1>标題</h1>
<ul>
<li>list-1</li>
<li>list-2 </li>
</ul>
"""