I think a space *should* be allowed. Some text editors seem to wrap between those characters, IIRC, which leads to problems if a space is not allowed.
Short of convincing argument to the contrary, I plan on keeping the optional space between the two in MultiMarkdown. So, for selfish reasons, I would love it if you keep it in peg-markdown so I don't have to revert the change. :) Fletcher Sent from my iPad On Sep 12, 2012, at 5:53 PM, John MacFarlane <j...@berkeley.edu> wrote: > I don't believe this question has been discussed before on > this list: Should whitespace be allowed between the bracketed > and parenthesized parts of an inline link? For example, > > [foo] (/url) > > The markdown syntax documentation says explicitly that a > space is allowed between the two parts of a *reference-style* link: > >> Reference-style links use a second set of square brackets, inside which >> you place a label of your choosing to identify the link: > >> This is [an example][id] reference-style link. >> >> You can optionally use a space to separate the sets of brackets: >> >> This is [an example] [id] reference-style link. > > It does not make the same claim about inline links. All it says > is: > >> To create an inline link, use a set of regular parentheses immediately >> after the link text’s closing square bracket. > > "Immediately after" is most naturally interpreted as ruling out > whitespace. (Note also that this passage comes before the passage > quoted above.) This interpretation is confirmed by Markdown.pl, > which allows > > [foo] [id] > > as a reference-style link, but does not treat > > [foo] (/url) > > as an inline link. > > Anyway, this was the reasoning the led me to disallow a space between > the two components of an inline link in pandoc. To me it would be more > natural to allow a space either in both kinds of links, but I tried to > stick to the spec. I note, though, that some implementations do allow a > space. > > I'm curious whether those who do allow the space have any justification > for going against the natural interpretation of the spec here (and > against Markdown.pl), or whether this is just an oversight. I think > it would be good if implementations did not diverge on this. > > John > > PS. My own peg-markdown does allow the space. I think I'd just > forgotten that the spec treats inline and reference-style links > differently in this respect. > > PPS. This query was prompted by a bug report against pandoc. > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=687453 > > _______________________________________________ > Markdown-Discuss mailing list > Markdown-Discuss@six.pairlist.net > http://six.pairlist.net/mailman/listinfo/markdown-discuss
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss