Github 使用什么库来解析 markdown?
What library does Github use for parsing markdown?
Github "uses" github flavored markdown 但我没能找到它的确切含义。他们在客户端使用什么解析库来呈现预览?
*.md 文件、问题和 wiki 页面是否使用相同的库?
如果你能给我指出显示 github flavored markdown 和 commonmark 如何重叠以及它们有何不同的资源,则加分。
Markup is "The code we [Github] use to render README.your_favorite_markup". They list Redcarpet as their library for Markdown. This, in turn, uses Sundown。我不确定这是否用于所有站点。
它还声称有 "massive extension support"。
Sundown has optional support for several (unofficial) Markdown extensions, such as non-strict emphasis, fenced code blocks, tables, autolinks, strikethrough and more.
要了解完整的细节,您可能需要深入研究这些库。
Bonus points if you can point me to a resource that shows how github flavored markdown and commonmark overlap and how they are different.
Sundown 声称 "fully standards compliant" 具有 Markdown v1.0.0 和 v1.0.3,但我终究找不到这些版本。只有 v1.0.1 and CommonMark 是 0.26.
Sundown passes out of the box the official Markdown v1.0.0 and v1.0.3 test suites, and has been extensively tested with additional corner cases to make sure its output is as sane as possible at all times.
Github Markdown 扩展是 documented in their Mastering Markdown guide。
point me to a resource that shows how github flavored markdown and commonmark overlap and how they are different.
这是现在(2017 年 3 月)的正式记录:请参阅“A formal spec for GitHub Flavored Markdown”
Starting today, all Markdown user content hosted in our website, including user comments, wikis, and .md files in repositories will be parsed and rendered following a formal specification for GitHub Flavored Markdown.
这在“A formal spec for GitHub Flavored Markdown”
中有详细说明
This formal specification is based on CommonMark, an ambitious project to formally specify the Markdown syntax used by many websites on the internet in a way that reflects its real world usage.
CommonMark allows people to continue using Markdown the same way they always have, while offering developers a comprehensive specification and reference implementations to interoperate and display Markdown in a consistent way between platforms.
想法是:
Taking the CommonMark spec and re-engineering our current user content stack around it is not a trivial endeavour.
The main issue we struggled with is that the spec (and hence its reference implementations) focuses strictly on the common subset of Markdown that is supported by the original Perl implementation.
This does not include some of the extended features that have been always available on GitHub. Most notably, support for tables, strikethrough, autolinks and task lists are missing.
In order to fully specify the version of Markdown we use at GitHub (known as GFM), we had to formally define the syntax and semantics of these features, something which we had never done before. We did this on top of the existing CommonMark spec, taking special care to ensure that our extensions are a strict and optional superset of the original specification.
Github "uses" github flavored markdown 但我没能找到它的确切含义。他们在客户端使用什么解析库来呈现预览?
*.md 文件、问题和 wiki 页面是否使用相同的库?
如果你能给我指出显示 github flavored markdown 和 commonmark 如何重叠以及它们有何不同的资源,则加分。
Markup is "The code we [Github] use to render README.your_favorite_markup". They list Redcarpet as their library for Markdown. This, in turn, uses Sundown。我不确定这是否用于所有站点。
它还声称有 "massive extension support"。
Sundown has optional support for several (unofficial) Markdown extensions, such as non-strict emphasis, fenced code blocks, tables, autolinks, strikethrough and more.
要了解完整的细节,您可能需要深入研究这些库。
Bonus points if you can point me to a resource that shows how github flavored markdown and commonmark overlap and how they are different.
Sundown 声称 "fully standards compliant" 具有 Markdown v1.0.0 和 v1.0.3,但我终究找不到这些版本。只有 v1.0.1 and CommonMark 是 0.26.
Sundown passes out of the box the official Markdown v1.0.0 and v1.0.3 test suites, and has been extensively tested with additional corner cases to make sure its output is as sane as possible at all times.
Github Markdown 扩展是 documented in their Mastering Markdown guide。
point me to a resource that shows how github flavored markdown and commonmark overlap and how they are different.
这是现在(2017 年 3 月)的正式记录:请参阅“A formal spec for GitHub Flavored Markdown”
Starting today, all Markdown user content hosted in our website, including user comments, wikis, and .md files in repositories will be parsed and rendered following a formal specification for GitHub Flavored Markdown.
这在“A formal spec for GitHub Flavored Markdown”
中有详细说明This formal specification is based on CommonMark, an ambitious project to formally specify the Markdown syntax used by many websites on the internet in a way that reflects its real world usage.
CommonMark allows people to continue using Markdown the same way they always have, while offering developers a comprehensive specification and reference implementations to interoperate and display Markdown in a consistent way between platforms.
想法是:
Taking the CommonMark spec and re-engineering our current user content stack around it is not a trivial endeavour.
The main issue we struggled with is that the spec (and hence its reference implementations) focuses strictly on the common subset of Markdown that is supported by the original Perl implementation.
This does not include some of the extended features that have been always available on GitHub. Most notably, support for tables, strikethrough, autolinks and task lists are missing.In order to fully specify the version of Markdown we use at GitHub (known as GFM), we had to formally define the syntax and semantics of these features, something which we had never done before. We did this on top of the existing CommonMark spec, taking special care to ensure that our extensions are a strict and optional superset of the original specification.