Markdown Extra Spec: Parsing Section

John MacFarlane jgm at
Fri May 9 14:35:33 EDT 2008

> In my reading of Michel's document, refnames are labels used to

> connect "reference-style" links and footnotes to their definition.

> That's different from link _text_. You can have


> [[hi]](/url)


> but you cannot have


> [Hi!][[hi]]


> [[hi]]:


> I am assuming that there will be a different type to deal with link text.

Ah yes, you're right about the document, and about the current behavior
of PHP markdown.

Still, why shouldn't refnames be allowed to have embedded brackets
and newlines, if explicit links can? (Pandoc allows both, as does
peg-markdown; I hadn't noticed the divergence before.) It seems a bad
idea to expect users to be aware of the distinction. A user would
naturally expect that a link like

[[link with embedded brackets]](/url)

could be converted into a reference-style link like this:

[[link with embedded brackets]]

[[link with embedded brackets]]: /url

But this won't work in the current implementations.

The markdown syntax documentation on doesn't say
anything that would lead one to expect this behavior, either.

If people think there's a good reason to keep the current behavior,
though, I can change my programs to conform.


More information about the Markdown-Discuss mailing list