Table plugin for Patitas (GFM-style pipe tables).
Adds support for GitHub-Flavored Markdown tables.
Usage:
>>> md = create_markdown(plugins=["table"])
>>> md("| A | B |
|---|---|
| 1 | 2 |")
'
| A | B |
...'
Syntax:
| Header 1 |
Header 2 |
| Cell 1 |
Cell 2 |
Alignment:
Features:
- Column alignment via :--- :--: ---:
- Inline markdown in cells
- Pipes can be escaped with
\|
Thread Safety:
This plugin is stateless and thread-safe.
Classes
Plugin adding GFM table support.
Tables are detected at the block level when a line starts with |
and is followed by a delimiter row (|---|---|).
Methods
def name(self) -> str
Returns
str
def extend_lexer(self, lexer_class: type[Lexer]) -> None
Parameters
| Name |
Type |
Description |
lexer_class |
— |
|
def extend_parser(self, parser_class: type[Parser]) -> None
Parameters
| Name |
Type |
Description |
parser_class |
— |
|
def extend_renderer(self, renderer_class: type[HtmlRenderer]) -> None
Parameters
| Name |
Type |
Description |
renderer_class |
— |
|