-
The Basics - Library Reference — Python-Markdown 3.0.1 documentation #ril
import markdown html = markdown.markdown(your_text_string) # 一個動作就把 Markdown 轉 HTML 了
- Differences - Python-Markdown — Python-Markdown 3.0.1 documentation #ril
- While Python-Markdown strives to fully implement markdown as described in the syntax rules, the rules can be interpreted in different ways and different implementations occasionally vary in their behavior (see the Babelmark FAQ for some examples). Known and INTENTIONAL differences found in Python-Markdown are summarized below: 有些部份 Markdown 原作者沒講清楚,衍生出實作上的差異
- Middle-Word Emphasis -- Python-Markdown defaults to ignoring MIDDLE-WORD EMPHASIS (and strong emphasis). In other words,
some_long_filename.txt
will not becomesome<em>long</em>filename.txt
. This can be switched off if desired. See the Legacy EM Extension for details. 這對中文很重要 (否則要刻意寫成用 _底線_ 標示重點
),啟用legacy_em
extension 即可,確認過在 code span 裡的底線不受影響。
- Extensions — Python-Markdown 3.0.1 documentation #ril
- Third Party Extensions · Python-Markdown/markdown Wiki #ril
- Extension API — Python-Markdown 3.0.1 documentation #ril
- Arithmatex - PyMdown Extensions Documentation 提供好多 extension,數量很誇張! #ril
手冊: