admin管理员组文章数量:1323714
The problem with writing my own Markdown parser in Clojure is that Markdown is not a well-specified language. There is no "official" grammar, just an informal "Here's how it works" description and a really ugly reference implementation in Perl. /
I can see Gruber's specification here and the implementation here.
This is an implementation that wins the google ranking test here
Then there is peg-markdown which appears to solve the 'there is no grammar' problem - but is not the canonical implementation.
My question is - what is the canonical implementation of markdown? (The one that everybody says defines the standard).
EDIT:
I acknowledge that "there is no canonical standard". I'm looking for the next best thing.
The answer seems to be showdown.js, but there are problems with it.
(using the definition of canonical being the one that everybody says defines the standard).
It gets referenced here and on github here.
I'll throw in pagedown as well (as aluded to by @deceze) because it appears to fix the bugs in showdown and be a little closer to Gruber's original.
The problem with writing my own Markdown parser in Clojure is that Markdown is not a well-specified language. There is no "official" grammar, just an informal "Here's how it works" description and a really ugly reference implementation in Perl. http://briancarper/blog/415/
I can see Gruber's specification here and the implementation here.
This is an implementation that wins the google ranking test here
Then there is peg-markdown which appears to solve the 'there is no grammar' problem - but is not the canonical implementation.
My question is - what is the canonical implementation of markdown? (The one that everybody says defines the standard).
EDIT:
I acknowledge that "there is no canonical standard". I'm looking for the next best thing.
The answer seems to be showdown.js, but there are problems with it.
(using the definition of canonical being the one that everybody says defines the standard).
It gets referenced here and on github here.
I'll throw in pagedown as well (as aluded to by @deceze) because it appears to fix the bugs in showdown and be a little closer to Gruber's original.
Share Improve this question edited May 23, 2017 at 11:53 CommunityBot 11 silver badge asked Sep 5, 2011 at 11:37 hawkeyehawkeye 35.8k35 gold badges159 silver badges314 bronze badges 2- 1 Also see six.pairlist/mailman/listinfo/markdown-discuss – daxim Commented Sep 5, 2011 at 12:13
- 1 Also see codinghorror./blog/2009/12/… (Which is to say that the answer is most likely pretty much None.) – deceze ♦ Commented Sep 5, 2011 at 12:17
2 Answers
Reset to default 6I believe Gruber's is the original and sort-of-canonical (see, for example, his 'Introducing Markdown'), and then people have extended it from there. I think some extensions are more mon than others though, so it's probably worth seeing what a few well-used packages have over his original.
The CommonMark project attempts to address some of the issues of the Markdown specification, in particular some ambiguities. It es with a reference implementation, but that's obviously just the reference implementation for CommonMark, not for Markdown in general. It may bee the de-facto standard in years to e, since some major users are involved in that project, but it might as well bee just another dialect among many, in which case the reference implementation would add little value.
本文标签: javascriptWhat is the canonical implementation of markdownStack Overflow
版权声明:本文标题:javascript - What is the canonical implementation of markdown? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742126478a2421966.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论