38 releases (21 stable)

1.2.9 Jun 27, 2024
1.2.5 May 21, 2024
1.2.4 Feb 27, 2024
0.5.1 Jan 6, 2024

#1356 in Parser implementations

Download history 36/week @ 2024-03-16 1/week @ 2024-03-23 16/week @ 2024-03-30 60/week @ 2024-04-06 8/week @ 2024-04-13 32/week @ 2024-04-20 2/week @ 2024-04-27 52/week @ 2024-05-04 366/week @ 2024-05-11 553/week @ 2024-05-18 260/week @ 2024-05-25 272/week @ 2024-06-01 170/week @ 2024-06-08 114/week @ 2024-06-15 606/week @ 2024-06-22 45/week @ 2024-06-29

975 downloads per month
Used in 2 crates

Apache-2.0

28KB
641 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.3–7MB
~34K SLoC