Link syntax (was: definition lists?)
Jason Blevins
jrblevin at sdf.lonestar.org
Fri Nov 21 11:36:30 EST 2008
Thomas Nichols wrote:
> Tangentially, I notice that this post by Waylan uses a link syntax which
> doesn't seem to be defined by
> <http://daringfireball.net/projects/markdown/syntax#link> but seems to
> work in some implementations at <http://babelmark.bobtfish.net/> - that is,
>
> from the git repo [1]
> instead of
> from the git repo [1][]
> or
> from the [git repo] [1].
>
> The link definition is then
>
> [1]: http://gitorious.org/projects/python-markdown/repos/mainline
This was introduced in Markdown.pl 1.0.2b2.
> Which of the outputs generated at
> <http://babelmark.bobtfish.net/?markdown=checkout+from+the+git+repo+[1]%0D%0Aat+commit+e968bbf+(on+Nov+6)%2C%0D%0A%0D%0A[1]%3A+http%3A%2F%2Fgitorious.org%2Fprojects%2Fpython-markdown%2Frepos%2Fmainline&src=1&dest=2>
> (also available at <http://tinyurl.com/6hq7ut> in case the full URI gets
> mashed) is considered 'expected'?
On Babelmark Markdown.pl 1.0.2b8 honors this implicit reference syntax but
1.0.1 doesn't. I was aware of this syntax so my expected output is that
of the beta version. I haven't used it myself though because I've often
wondered how 'standard' it is. It looks like the majority of implementations
do support it though.
> IIUC, what I'll refer to "Waylan's syntax" makes any text enclosed in
> square brackets into a candidate for a link; the parser then searches
> for a matching link definition. I'm undecided whether the simplicity of
> this syntax offsets the risk of breaking existing documents. A link will
> only be generated if a matching link definition is found, IIUC, so
> perhaps this risk is acceptably low?
>
> Please point me to a previous discussion if available, I couldn't find
> one in the archives.
I couldn't find any discussion of it on the list, but here's the
changelog entry:
1.0.2b2 - 20 Mar 2005
+ Experimental support for [this] as a synonym for [this][].
(Note to self: No test yet for this.)
Be sure to test, e.g.: [permutations of this sort of [thing][].]
Jason
--
Jason Blevins
Ph.D. Candidate, Department of Economics, Duke University
http://jblevins.org/
More information about the Markdown-Discuss
mailing list