Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/izyuumi/html2md-rs
HTML to Markdown Parser in Rust
https://github.com/izyuumi/html2md-rs
html html-to-markdown markdown rust
Last synced: about 4 hours ago
JSON representation
HTML to Markdown Parser in Rust
- Host: GitHub
- URL: https://github.com/izyuumi/html2md-rs
- Owner: izyuumi
- License: mit
- Created: 2024-02-19T19:29:22.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-26T22:06:18.000Z (7 months ago)
- Last Synced: 2024-04-27T22:17:51.278Z (7 months ago)
- Topics: html, html-to-markdown, markdown, rust
- Language: Rust
- Homepage: https://crates.io/crates/html2md-rs
- Size: 90.8 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# html2md-rs
Parses HTML and converts it to markdown.
## Usage
```rust
use html2md_rs::to_md::from_html_to_md;fn main() {
let html = "Hello, World!
";
let md = from_html_to_md(html);
assert_eq!(md, "# Hello, World!");
}
```## Markdown Convention
There are many markdown conventions/standards out there. This project references the [CommonMark Spec](https://spec.commonmark.org/0.31.2/).
## Supported HTML tags
Check the supported HTML tags [here](./src/structs.rs). Unsupported HTML tags will be parsed as `NodeType::Unknown(String)`.
## License
This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.