htmd
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| HtmdConverter mkconvert.converters.htmd htmd: fast Rust converter. |
🛈 DocStrings¶
Converter using htmd-py (Rust, port of turndown).
HtmdConverter
¶
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'
|