Markdown Extra Spec: Parsing Section

John MacFarlane jgm at berkeley.edu
Mon May 12 21:55:19 EDT 2008



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

>> text.

>

> There will.


Is there any good reason for having two different types here? As far as
I can see, allowing anything that can serve as link text to be a refname
would not contradict anything in the official Markdown syntax
specification. In addition, it is hard to imagine a realistic case where
allowing brackets and newlines in refnames would break an existing
document. Why make users remember extra restrictions? (I didn't even
know about them until a few days ago, and I've used markdown for years.)
And why expose users to the risk that their documents will break if they
hard-wrap a long refname?

I think the current behavior of phpmarkdown and Markdown.pl is very
confusing. This produces a link:

[[hi]][]

[[hi]]: /url

But this doesn't produce a link:

[hello][[hi]]

[[hi]]: /url

So either (a) not all link references begin with a refname, or (b)
refnames can sometimes (but not always!) contain embedded brackets.
Either option would conflict with Michel's syntax specification
as it now stands.

John



More information about the Markdown-Discuss mailing list