‹› markdown.extensions.tables

Added parsing of tables to Python-Markdown.

See the documentation for details.

‹› markdown.extensions.tables.TableProcessor(parser: blockparser.BlockParser, config: dict[str, Any])

Bases: BlockProcessor

Process Tables.

‹› markdown.extensions.tables.TableProcessor.test(parent: etree.Element, block: str) -> bool

Ensure first two rows (column header and separator row) are valid table rows.

Keep border check and separator row do avoid repeating the work.

‹› markdown.extensions.tables.TableProcessor.run(parent: etree.Element, blocks: list[str]) -> None

Parse a table block and build table.

‹› markdown.extensions.tables.TableExtension(**kwargs)

Bases: Extension

Add tables to Markdown.

‹› markdown.extensions.tables.TableExtension.config instance-attribute

Default configuration options.

Defined Value:

self.config = {
    'use_align_attribute': [False, 'True to use align attribute instead of style.'],
}

‹› markdown.extensions.tables.TableExtension.extendMarkdown(md)

Add an instance of TableProcessor to BlockParser.