From: Jack M. <ja...@co...> - 2008-10-17 15:13:41
|
On Fri, Oct 17, 2008 at 09:30:49AM -0400, Waylan Limberg wrote: > Oh, one other thing, wrap the toctitle in an if statement and only add > it if a title is set in the config settings. Right now your getting a > blank title ``<span class="toctitle" />``. > Yeah, I actually just forgot the [0] on the config, so typo fixed. > > * Why are you creating anchors in each header? Why not just assign > > each header an "id" attribute? That is generally considered the > > correct way to do things and works just the same. > > Well, I like the headers to be turned into links. As with a lot of things that are pure preference, I just turned it into a config option (anchorlink) which defaults to 0, but if set makes the link. > > * It would be nice if it worked with the HeaderID extension. That is, > > if a header already has an id attribute, that is used rather than > > recreating one which may be different. Ah yes. Fixed. The code has been updated: http://codezen.org/static/toc-updated.py --Jack |