Angle bracket enclosed URL in reference link fails.
Input:
[a][b]
[b]: <http://a.com>
The output href contains <>, but the original docs http://daringfireball.net/projects/markdown/syntax#link say it should work:
The link URL may, optionally, be surrounded by angle brackets
and it works on every major implementation except multi markdown.
If I could turn back time, I would not allow angle brackets like your implementation: it is better to have a single way of doing things.
But what is done is done, so until we have a markdown specification, it is better to be compatible IMHO.
Discovered with the Markdown Test Suite at https://github.com/karlcow/markdown-testsuite/pull/50 . Congrats: this is the only failing test!
I agree, that's a bug. (Note: multimarkdown uses peg-markdown code for its core markdown parsing, so no surprise that it fails too.)
There are other implementations that fail also: http://johnmacfarlane.net/babelmark2/?normalize=1&text=%5Ba%5D%5Bb%5D%0A%0A%5Bb%5D%3A+%3Chttp%3A%2F%2Furl.com%3E%0A
I'm not actively maintaining peg-markdown any more, so I may not get around to fixing this. (I've got something better which I hope to release before long.)
@jgm thanks for the very informative reply.
Is babelmark2 open source? In particular, I would like to see the normalization code, and how you are calling each engine to use it on the Markdown Test Suite.
I meant in no way that you should fix this yourself: just filling the database =) I recommend putting either a "deprecated in favor of" or "looking for maintainers" notice on the repo description or at the top of the README.
You got me curious now: the other thing you are working on is it closed source? Is it another markdown engine? What language will it be written on?
babelmark2 isn't currently open source, but I'm using the beautify-html javascript library to normalize.
To call the different engines, I just make HTTP requests. See the FAQ on how to add an engine. Different people maintain the servers for different engines, freeing me of the responsibility to keep them all updated.
The new thing I'm working on is a complete spec and very comprehensive test suite for markdown, with a C implementation that parses the syntax efficiently. It will all be open source, but it's not ready yet.
Cool. The markdown test suite also aims at making a spec: https://github.com/karlcow/markdown-testsuite/blob/master/markdown-spec.html, but is still too basic. The tests on the other hand are good I think: 103 total. Hope both projects can work together as closely as possible.