html2md_rs/
lib.rs

1//! A library for safely parsing HTML and converting it to Markdown.
2//!
3//!
4//! ## Example
5//!
6//! ```rust
7//! use html2md_rs::to_md::from_html_to_md;
8//!
9//! let html = "<h1>Hello World</h1>".to_string();
10//! let parsed = from_html_to_md(html);
11//!
12//! assert_eq!(parsed, "# Hello World\n");
13//! ```
14//!
15//! ## Supported HTML Elements
16//!
17//! The list of supported HTML elements is in the [structs::NodeType](structs/enum.NodeType.html) enum.
18//!
19//! ## HTML Attributes
20//!
21//! By default, the library parses all attributes of an HTML element as a HashMap.
22//!
23//! ## Markdown Convention
24//!
25//! This library follows the [CommonMark Spec](https://spec.commonmark.org/0.31.2/).
26//!
27//! ## License
28//!
29//! This library is licensed under the MIT license. Check the [GitHub repository](https://github.com/izyuumi/html2md-rs) for more information.
30
31pub mod parser;
32pub mod structs;
33pub mod to_md;