module documentation

Table of Contents Extension for Python-Markdown =============================================== See <https://Python-Markdown.github.io/extensions/toc> for documentation. Oringinal code Copyright 2008 [Jack Miller](https://codezen.org/) All changes Copyright 2008-2014 The Python Markdown Project License: [BSD](https://opensource.org/licenses/bsd-license.php)

Class TocExtension Undocumented
Class TocTreeprocessor No class docstring; 0/14 instance variable, 4/8 methods documented
Function get_name Get title name.
Function makeExtension Undocumented
Function nest_toc_tokens Given an unsorted list with errors and skips, return a nested one. [{'level': 1}, {'level': 2}] => [{'level': 1, 'children': [{'level': 2, 'children': []}]}]
Function slugify Slugify a string, to make it URL friendly.
Function slugify_unicode Slugify a string, to make it URL friendly while preserving Unicode characters.
Function stashedHTML2text Extract raw HTML from stash, reduce to plain text and swap with placeholder.
Function unescape Unescape escaped text.
Function unique Ensure id is unique in set of ids. Append '_1', '_2'... if not
Constant IDCOUNT_RE Undocumented
def get_name(el): (source)

Get title name.

def makeExtension(**kwargs): (source)

Undocumented

def nest_toc_tokens(toc_list): (source)

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': []}]

def slugify(value, separator, unicode=False): (source)

Slugify a string, to make it URL friendly.

def slugify_unicode(value, separator): (source)

Slugify a string, to make it URL friendly while preserving Unicode characters.

def stashedHTML2text(text, md, strip_entities=True): (source)

Extract raw HTML from stash, reduce to plain text and swap with placeholder.

def unescape(text): (source)

Unescape escaped text.

def unique(id, ids): (source)

Ensure id is unique in set of ids. Append '_1', '_2'... if not

IDCOUNT_RE = (source)

Undocumented

Value
re.compile(r'^(.*)_([0-9]+)$')