thoughts on predefining links

John Gruber gruber at fedora.net
Wed Mar 10 17:22:55 EST 2004


Jason Clark <jason at jclark.org> wrote on 03/10/04 at 5:10p:

> This raises another issue... %g_urls is not 
> flushed between stories.   This isn't really a problem without the 
> links-file enhancement; links in each story will overwrite links in 
> earlier stories.

I'll respond in greater depth later (I'm trying to finish the syntax
documentation today), but what you've mentioned above is actually a
bug, and it will be fixed in the next beta.

Here's what can happen. Let's say you have two articles that both
use the same link reference ID. For example, article A defines:

    [1]: http://foo.com  "The Foo Homepage"

And article B defines:

    [1]: http://bar.com  "The Bar Homepage"

At this point, you're OK, and the bug won't affect you. If both
articles end up on the same page -- like if these are your two most
recent articles and they both appear on your index page -- the link
id "1" will be redefined completely for each article.

But, if article B defines the link without a title:

    [1]: http://bar.com

Markdown will end up using the title that was defined in article A.

In other words, the anchor tag in article B will look like:

    <a href="http://bar.com" title="The Foo Homepage">

The href is right, but the title should be empty.

Like I said, this will be fixed in the next beta.

-J.G.


More information about the Markdown-discuss mailing list