Attribute references

Carl-Johan Kihlbom extra at newcode.se
Sun Jan 9 19:46:47 EST 2005


On Jan 9, 2005, at 20:49, Aaron VonderHaar wrote:

> I was thinking about this a while ago, and my idea was, why not
> automatically put an id on every header?  For example,
>
> ===
> ## The Lousiana Purchase
>
> Napolean was, unquestionably, a brilliant military strategist, but he
> was not a very good real estate manager.
> ===
>
> (nothing has been added to the syntax)
>
> would produce
>
> ===
> <h2 id="the_louisiana_purchase">The Louisiana Purchase</h2>
>
> <p>Napolean was, unquestionably, a brilliant military strategist, but
> he was not a very good real estate manager.</p>
> ===

I think this is a great idea! A further development of this might be to 
allow automatic referencing:

	## The Lousiana Purchase
	
	Napoleon was, unquestionably, a brilliant military strategist, but he
	was not a very good real estate manager, as evidenced by [The Lousiana 
Purchase](#).

This would produce:

	<h2 id="the_lousiana_purchase">The Lousiana Purchase</h2>
	
	<p>Napoleon was, unquestionably, a brilliant military strategist, but 
he
	was not a very good real estate manager, as evidenced by <a 
href="#the_lousiana_purchase">The Lousiana Purchase</a>.

I guess we're all trying to bend Markdown to our own personal uses here 
:-)

/ Carl-Johan



More information about the Markdown-Discuss mailing list