Skip to content

processors ¤

This module contains a Markdown extension allowing to integrate generated headings into the ToC.

Classes:

HeadingReportingTreeprocessor ¤

HeadingReportingTreeprocessor(
    md: Markdown, headings: list[Element]
)

Bases: Treeprocessor

Records the heading elements encountered in the document.

IdPrependingTreeprocessor ¤

IdPrependingTreeprocessor(md: Markdown, id_prefix: str)

Bases: Treeprocessor

Prepend the configured prefix to IDs of all HTML elements.

InsertHeadings ¤

InsertHeadings(md: Markdown)

Bases: Treeprocessor

Our headings insertor.

Parameters:

  • md (Markdown) –

    A markdown.Markdown instance.

RemoveHeadings ¤

Bases: Treeprocessor

Our headings remover.