[Link] shortcut

Michel Fortin michel.fortin at michelf.com
Mon Mar 21 14:41:48 EST 2005


Le 21 mars 2005, à 12:17, John Gruber a écrit :

> Here's a problem that's occurred to me, however. If you have adjacent 
> links like this:
>
>     Check out [this] [that] and [the other].
>
>     [this]: /this/
>
>     [that]: /that/
>
>     [the other]: /theother/
>
> You're going to get unexpected output:
>
>     <p>Check out <a href="/that/">this</a> and <a href="/theother/">the
>     other</a>.</p>

Hum, couldn't we do better? When finding `[this] [that]`, Markdown 
checks if there is a label named "this". If such a label exists, 
Markdown makes two links using the new syntax. So:

	Check out [this] [that] and [the other].

	  [this]: this
	  [that]: that
	  [the other]: the_other

gives three links while:

	Check out [this] [that] and [the other].

	  [that]: that
	  [the other]: the_other

give two links.


Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/



More information about the Markdown-Discuss mailing list