Expand description
HTML to Markdown converter using AST-to-AST transformation.
§Quick start
let md = html2markdown::convert("<h1>Hello</h1><p>World</p>");
assert_eq!(md, "# Hello\n\nWorld\n");§Related crates
trafilatura— full-featured web content extraction with metadata, comments, and fallback strategies.libreadability— Mozilla Readability port for extracting a clean article DOM subtree.justext— paragraph-level boilerplate removal using stopword density.
Modules§
- mdast
- Markdown Abstract Syntax Tree (MDAST) node types.
Structs§
- Options
- Conversion options.
- Stringify
Options - Serializer configuration.
Enums§
- Heading
Style - Heading style.
- List
Item Indent - List item indentation style.
Functions§
- convert
- Convert an HTML string to Markdown using default options.
- convert_
with - Convert an HTML string to Markdown with custom options.
- html_
to_ mdast - Parse HTML and transform it into an MDAST tree.
- mdast_
to_ string - Serialize an MDAST tree to a Markdown string.