Markdown2Parser
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| MarkdownParser mkconvert.parsers.base Base class for Markdown -> HTML parsers. |
⋔ Inheritance diagram¶
graph TD
4091928880["markdown2.Markdown2Parser"]
2536207506["base.MarkdownParser"]
1836221132["_core.Backend"]
925645236["abc.ABC"]
2751680898["builtins.object"]
3481597255["typing.Generic"]
2536207506 --> 4091928880
1836221132 --> 2536207506
925645236 --> 1836221132
2751680898 --> 925645236
3481597255 --> 1836221132
2751680898 --> 3481597255
🛈 DocStrings¶
Bases: MarkdownParser
markdown2: pure-Python Markdown (not CommonMark compliant), many "extras".
Not supported: autolinks, math, definition_lists.
Source code in src/mkconvert/parsers/markdown2.py
__init__
¶
__init__(
options: MarkdownOptions | None = None,
*,
on_unsupported: OnUnsupported = "warn",
extras: Mapping[str, Any] | None = None,
highlight: bool = False,
html4tags: bool = False,
) -> None
Create a markdown2 parser.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
options
|
MarkdownOptions | None
|
Common options. |
None
|
on_unsupported
|
OnUnsupported
|
See |
'warn'
|
extras
|
Mapping[str, Any] | None
|
Further markdown2 extras with their settings ( |
None
|
highlight
|
bool
|
Highlight fenced code blocks with Pygments (if installed). |
False
|
html4tags
|
bool
|
HTML4-style tags ( |
False
|