From: Yuri T. <qar...@gm...> - 2008-10-17 16:31:29
|
Thanks. I appreciate you doing this work. I checked the extension in under markdown_extensions/toc.py and put a test file under tests/extensions-x-toc/syntax-toc.txt. I can't get it to work for some reason, though. The file extension loads and does add the IDs, but doesn't seem to add the anchors or the actual TOC. Am I missing something? - yuri On Fri, Oct 17, 2008 at 8:13 AM, Jack Miller <ja...@co...> wrote: > 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 > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss > -- http://sputnik.freewisdom.org/ |