Attribute references
Michel Fortin
michel.fortin at michelf.com
Sun Jan 9 18:12:47 EST 2005
Le 9 janv. 2005, à 16:40, european bob a écrit :
> On Sun, 2005-01-09 at 16:19 -0500, Michel Fortin wrote:
>> I think it's a lot better this way:
>>
>> ## My Intriguing Header ## {id="intrigue"}
>>
>> This is a link to [my intriguing header](#intrigue).
>>
>> Or this way:
>>
>> ## My Intriguing Header ## {#intrigue}
>>
>> This is a link to [my intriguing header](#intrigue).
>
> Actually, I don't like either of those :) If you're going to link using
> this references, they should turn into internal anchors - which are not
> tag ids.
>
> I'm not sure John was suggesting using this to be able to setup
> internal
> links, but it would be nice in a way I think. It feels a little bit
> dodgy though.
Hum, I think this should be clarified a bit. The output expected from
these two examples is this:
<h2 id="intrigue">My Intriguing Header</h2>
<p>This is a link to <a href="#intrigue">my intriguing header</a>.</p>
There is not conversion going on with the link's URL. `#intrigue` *is*
the URL that is inside the href attribute. When you do a link to an url
starting with a hash (`#`), it tells the browser to move *in the
current page* to the element with the corresponding "id" attribute.
Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/
More information about the Markdown-Discuss
mailing list