On Thu, Mar 5, 2009 at 4:27 AM, Daniel Winterstein
<daniel.winterst...@gmail.com> wrote:
>
> I'm using Markdown in an app and would like to provide support for including
> a table of contents.
> Any suggestions for a syntax? Has anyone done this before?

Yes, Python-Markdown has an extension [1] that does this.
Unfortunately, its not documented properly yet (it hasn't been
officially released yet either), but it works on the same basic
premise as your third suggestion. It uses all the headers to build a
nested list and then either inserts that list at the location of the
marker ``[TOC]``, or if the marker is not found, at the beginning of
the document.

[1]: 
http://gitorious.org/projects/python-markdown/repos/mainline/blobs/master/markdown/extensions/toc.py

-- 
----
\X/ /-\ `/ |_ /-\ |\|
Waylan Limberg
_______________________________________________
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss

Reply via email to