Header ids in PHP Markdown Extra

Michel Fortin michel.fortin at michelf.com
Fri Sep 2 00:06:18 EDT 2005


Uche Ogbuji discussion on his weblog about html attributes makes me
think that I currently have support for id attributes (for headers
only) in my latest working copy of PHP Markdown Extra. It works this
way:

Header {#head1}
------

## Header ## {#head2}

This works only for id attributes and only for headers, but I think
it is pretty useful in many situations.

Since PHP Markdown Extra aims at creating things likely to be seen in
Markdown in a near future, I would like to know if this syntax seems
appropriate. I think it is simple and clever as it looks like a CSS
id selector.

If someone thinks implementing ids like this is a bad idea, please
raise your hand and explain. Otherwise, PHP Markdown Extra 1.0 is
scheduled to be published this weekend, with this new feature enabled.


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




More information about the Markdown-Discuss mailing list