HtmdConverter
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| HtmlToMarkdownConverter mkconvert.converters.base Base class for HTML -> Markdown converters. |
⋔ Inheritance diagram¶
graph TD
2349700106["htmd.HtmdConverter"]
1426344930["base.HtmlToMarkdownConverter"]
1836221132["_core.Backend"]
925645236["abc.ABC"]
2751680898["builtins.object"]
3481597255["typing.Generic"]
1426344930 --> 2349700106
1836221132 --> 1426344930
925645236 --> 1836221132
2751680898 --> 925645236
3481597255 --> 1836221132
2751680898 --> 3481597255
🛈 DocStrings¶
Bases: HtmlToMarkdownConverter
htmd: fast Rust converter.
Not supported: emphasis_marker="_".
Source code in src/mkconvert/converters/htmd.py
__init__
¶
__init__(
options: HtmlToMarkdownOptions | None = None,
*,
on_unsupported: OnUnsupported = "warn",
hr_style: Literal["dashes", "asterisks", "underscores"] = "dashes",
link_reference_style: Literal["full", "collapsed", "shortcut"] = "full",
preformatted_code: bool = False,
ul_bullet_spacing: int = 1,
ol_number_spacing: int = 1,
translation_mode: Literal["pure", "faithful"] = "pure",
) -> None
Create an htmd converter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
options
|
HtmlToMarkdownOptions | None
|
Common options. |
None
|
on_unsupported
|
OnUnsupported
|
See |
'warn'
|
hr_style
|
Literal['dashes', 'asterisks', 'underscores']
|
|
'dashes'
|
link_reference_style
|
Literal['full', 'collapsed', 'shortcut']
|
Reference link form (with |
'full'
|
preformatted_code
|
bool
|
Keep whitespace of inline |
False
|
ul_bullet_spacing
|
int
|
Spaces after a bullet list marker. |
1
|
ol_number_spacing
|
int
|
Spaces after an ordered list number. |
1
|
translation_mode
|
Literal['pure', 'faithful']
|
|
'pure'
|