Skip to main content

Crate html2markdown

Crate html2markdown 

Source
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");
  • 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.
StringifyOptions
Serializer configuration.

Enums§

HeadingStyle
Heading style.
ListItemIndent
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.