ó Šç\c@@sÕdZddlmZddlmZddlmZddlmZddlm Z m Z m Z dd l m Z mZmZmZdd lZd „Zd efd „ƒYZdefd„ƒYZid„Zd S(u« Table of Contents Extension for Python-Markdown * * * (c) 2008 [Jack Miller](http://codezen.org) Dependencies: * [Markdown 2.1+](http://packages.python.org/Markdown/) i(tabsolute_import(tunicode_literalsi(t Extensioni(t Treeprocessor(tetreetparseBoolValuetAMP_SUBSTITUTE(tslugifytuniquetitertexttstashedHTML2textNc@s2idd6g‡fd†‰ˆ|ƒ\}}|S(u@Given an unsorted list with errors and skips, return a nested one. [{'level': 1}, {'level': 2}] => [{'level': 1, 'children': [{'level': 2, 'children': []}]}] A wrong list is also converted: [{'level': 2}, {'level': 1}] => [{'level': 2, 'children': []}, {'level': 1, 'children': []}] ièulevelc@sŒ|sggfS|jdƒ}d|jƒkr>g|d - Defaults to Noneutitleiu.1 if header should be a self linkDefaults to 0u anchorlinku:1 or link text if a Sphinx-style permalink should be addedu Defaults to 0u permalink(RRAR9t setConfig(Rtconfigstkeytvalue((s;/usr/lib/python2.7/site-packages/markdown/extensions/toc.pyt__init__Ïs    cC@s8|j|ƒ}|jƒ|_|jjd|dƒdS(Nutocu_end(tTreeProcessorClasst getConfigsR9RLRC(Rtmdt md_globalsttocext((s;/usr/lib/python2.7/site-packages/markdown/extensions/toc.pytextendMarkdownäs(R\R]RRdRcRi(((s;/usr/lib/python2.7/site-packages/markdown/extensions/toc.pyR^Ës cC@s td|ƒS(NR`(R^(R`((s;/usr/lib/python2.7/site-packages/markdown/extensions/toc.pyt makeExtensionïs(t__doc__t __future__RRtRRLRtutilRRRtheaderidRRR R R=RRR^Rj(((s;/usr/lib/python2.7/site-packages/markdown/extensions/toc.pyt s"  >x$