39 releases (22 stable)

1.2.10 Jul 15, 2024
1.2.5 May 21, 2024
1.2.4 Feb 27, 2024
0.5.1 Jan 6, 2024

#1939 in Parser implementations

Download history 158/week @ 2024-07-14 16/week @ 2024-07-21 79/week @ 2024-07-28 16/week @ 2024-08-04 18/week @ 2024-08-11 21/week @ 2024-08-18 38/week @ 2024-08-25 200/week @ 2024-09-01 190/week @ 2024-09-08 216/week @ 2024-09-15 318/week @ 2024-09-22 253/week @ 2024-09-29 251/week @ 2024-10-06 135/week @ 2024-10-13 38/week @ 2024-10-20 25/week @ 2024-10-27

461 downloads per month
Used in 2 crates

Apache-2.0

27KB
626 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