【发布时间】:2019-04-07 03:43:32
【问题描述】:
我试图了解 Markdown 与 HTML 的关系。如果我理解正确,两者都是markup languages(描述将格式化元素添加到纯文本文档的语言的总称)。 Markdown 将纯文本转换为 HTML。
我的理解是Markdown is a superset of HTML:
Markdown 是一种流行的标记语言,是 HTML 的超集。
我假设它是strict or proper superset。与What does it mean when one language is a parallel superset of another? 进行类比,我将其解释为每个有效的 HTML 程序也是有效的 Markdown 程序(例如,在 Jupyter Notebook Markdown 单元格中理解 HTML),但反之则不然。
我觉得矛盾的是,如果 Markdown 是 HTML 的超集,那么为什么是 Markdown can't do everything HTML can(我认为相反的情况是因为超集 extends the language without removing or changing any of the existing features。另外,我希望 HTML 是自 HTML is more expressive and more difficult to read by most humans 以来的 Markdown 超集。
下面是一个试图在What does “Objective-C is a superset of C more strictly than C++” mean exactly?中模仿的图表
【问题讨论】:
标签: html jupyter-notebook markdown