Ñò éíÑXc@ssdZddkZddklZddkZdeiifd„ƒYZdeifd„ƒYZhd„Z dS( sº Table of Contents Extension for Python-Markdown * * * (c) 2008 [Jack Miller](http://codezen.org) Dependencies: * [Markdown 2.0+](http://www.freewisdom.org/projects/python-markdown/) iÿÿÿÿN(tetreetTocTreeprocessorcBseZd„Zd„ZRS(ccs7x0|iƒD]"}x|D]}||fVqWq WdS(N(t getiterator(tselftroottparenttchild((s;/usr/lib/python2.6/site-packages/markdown/extensions/toc.pyt iterparents  cCsxtidƒ}d|idtt| ƒƒD]&} | | | jo|| | - Defaults to NoneR is.1 if header should be a self linkDefaults to 0R(RRRt setConfig(Rtconfigstkeytvalue((s;/usr/lib/python2.6/site-packages/markdown/extensions/toc.pyt__init__ms    cCsdddk}|id|ƒiddƒ}ttidd|ƒiƒiƒƒ}tidd |ƒS( s, Slugify a string, to make it URL friendly. iÿÿÿÿNtNFKDtasciitignores[^\w\s-]Rs[-\s]+t-(t unicodedatat normalizetencodetunicodeRtsubtstriptlower(RR?RE((s;/usr/lib/python2.6/site-packages/markdown/extensions/toc.pyRs 'cCs2t|ƒ}|i|_|iid|dƒdS(NR t_begin(RRttreeprocessorstadd(Rtmdt md_globalsttocext((s;/usr/lib/python2.6/site-packages/markdown/extensions/toc.pytextendMarkdown†s  (R9R:R@RRR(((s;/usr/lib/python2.6/site-packages/markdown/extensions/toc.pyR;ls  cCs td|ƒS(NR=(R;(R=((s;/usr/lib/python2.6/site-packages/markdown/extensions/toc.pyt makeExtension‹s( t__doc__tmarkdownRRRMt TreeprocessorRt ExtensionR;RS(((s;/usr/lib/python2.6/site-packages/markdown/extensions/toc.pyt s   ]