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.net/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.