PythonMarkdownParser
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| MarkdownParser mkconvert.parsers.base Base class for Markdown -> HTML parsers. |
⋔ Inheritance diagram¶
graph TD
39780109["python_markdown.PythonMarkdownParser"]
2536207506["base.MarkdownParser"]
1836221132["_core.Backend"]
925645236["abc.ABC"]
2751680898["builtins.object"]
3481597255["typing.Generic"]
2536207506 --> 39780109
1836221132 --> 2536207506
925645236 --> 1836221132
2751680898 --> 925645236
3481597255 --> 1836221132
2751680898 --> 3481597255
🛈 DocStrings¶
Bases: MarkdownParser
Python-Markdown with pymdown-extensions (not CommonMark compliant).
Fenced code blocks are always on. Strikethrough, task lists, autolinks and math
come from pymdown-extensions. Not supported: alerts.
Source code in src/mkconvert/parsers/python_markdown.py
__init__
¶
__init__(
options: MarkdownOptions | None = None,
*,
on_unsupported: OnUnsupported = "warn",
extensions: Sequence[str | Extension] = (),
extension_configs: Mapping[str, Mapping[str, Any]] | None = None,
output_format: Literal["html", "xhtml"] = "html",
) -> None
Create a Python-Markdown parser.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
options
|
MarkdownOptions | None
|
Common options. |
None
|
on_unsupported
|
OnUnsupported
|
See |
'warn'
|
extensions
|
Sequence[str | Extension]
|
Further extensions, e.g. |
()
|
extension_configs
|
Mapping[str, Mapping[str, Any]] | None
|
Settings per extension name; merged over the ones mkconvert uses for the common options. |
None
|
output_format
|
Literal['html', 'xhtml']
|
|
'html'
|