41 releases (24 stable)

1.2.12 Jan 4, 2025
1.2.10 Jul 15, 2024
1.2.9 Jun 27, 2024
1.2.4 Feb 27, 2024
0.5.1 Jan 6, 2024

#1429 in Parser implementations

Download history 318/week @ 2024-09-23 295/week @ 2024-09-30 205/week @ 2024-10-07 137/week @ 2024-10-14 36/week @ 2024-10-21 28/week @ 2024-10-28 78/week @ 2024-11-04 377/week @ 2024-11-11 132/week @ 2024-11-18 174/week @ 2024-11-25 87/week @ 2024-12-02 104/week @ 2024-12-09 124/week @ 2024-12-16 127/week @ 2024-12-23 277/week @ 2024-12-30 117/week @ 2025-01-06

652 downloads per month
Used in 5 crates (3 directly)

Apache-2.0

29KB
657 lines

mdka

HTML to Markdown (MD) converter written in Rust.

crates.io Documentation License Dependency Status

Summary

A kind of text manipulator named mdka. "ka" means "化 (か)" pointing to conversion.
Designed with in mind:

  • Fast speed
  • Low memory consumption
  • Easy usage

Usage

Cargo.toml

[dependencies]
mdka = "1.2"

awesome.rs

use mdka::from_html

fn awesome_fn() {
    let input = r#"
<h1>heading 1</h1>
<p>Hello, world.</p>"#;
    let ret = from_html(input);
    println!("{}", ret);
    // # heading 1
    // 
    // Hello, world.
    // 
}

Acknowledgements

Depends on Servo's html5ever / markup5ever.

Dependencies

~1.5–6.5MB
~35K SLoC