From: Jack M. <ja...@co...> - 2008-10-21 22:45:14
|
> Well, mostly. Now, if a header already has an id, both the header and > anchor will get the id. As ids should be unique, this creates invalid > html. I'd suggest *not* assigning an id to the anchor - just the > header. > > And speaking of unique, how are you guaranteeing that slugify does not > create the same id for two different headers? Not a showstopper, but > something to think about. You might be interested in how HeaderID > addresses this. Attached is a patch that handles both of these issues. I didn't use HeaderID code, but I matched the style (_1, _2, etc) and it should produce globally unique ids. > I don't mean to be so nitpicky Jack, but I would like something like > this packaged up with Markdown and it has to be right before that > happens. When I'm happy with it and with your blessings (and no > objection from Yuri) I'll commit it to the repo. > Hahaha. You're not being unreasonable, it's not a big deal. Trust me, I work with much more nitpicky people at work =) --Jack |