markdown.extensions.tables
§
Adds parsing of tables to Python-Markdown.
See the documentation for details.
Classes:
-
TableProcessor–Process Tables.
-
TableExtension–Add tables to Markdown.
markdown.extensions.tables.TableProcessor(parser: blockparser.BlockParser, config: dict[str, Any])
§
Bases: BlockProcessor
Process Tables.
Methods:
-
test–Ensure first two rows (column header and separator row) are valid table rows.
-
run–Parse a table block and build table.
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.
Methods:
-
extendMarkdown–Register the processor.
Attributes:
-
config–Default configuration options.
markdown.extensions.tables.TableExtension.config
instance-attribute
§
markdown.extensions.tables.TableExtension.extendMarkdown(md)
§
Register the processor.
| Class Instance | Registry | Name | Priority |
|---|---|---|---|
TableProcessor |
blockprocessors |
table |
75 |