An idea for within document anchor references
    Michel Fortin 
    michel.fortin at michelf.com
       
    Mon Aug 22 09:41:59 EDT 2005
    
    
  
John Gruber wrote:
> The idea would be:
>
>     ## This is a header ##
>
>     Blah blah blah.
>
>     ...
>
>     Blah blah, see "[This is a header][#]" for more info.
I'm okay with this, as long as this form is simply a shortcut for:
     Blah blah, see "[This is a header][#This is a header]" for more  
info.
This way, there is logic in it: it works almost the same way as  
regular reference links (using only "#" is a shortcut for when your  
link text is the same as the reference).
But it doesn't solve the issue of auto-generating ids. You say they  
get "some sort of GUID id attribute", but how do you generate user- 
friendly clash-free GUIDs?
Anyway, I would pretty much like define myself the id attributes for  
my headers like this:
     ## This is a header ##                 {#head}
Then, these three links would mean the same thing.
     Blah blah, see "[This is a header][#]" for more info.
     Blah blah, see "[This is a header][#This is a header]" for more  
info.
     Blah blah, see "[This is a header](#head)" for more info.
The question is: Do we really need to add the special link-to-header  
syntax -- which doesn't work when two headers have the same text --  
when all we need is the ability to set ids to headers?
Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/
    
    
More information about the Markdown-Discuss
mailing list