33 releases (16 stable)

1.2.4 Feb 27, 2024
1.2.1 Jan 20, 2024
0.5.1 Jan 6, 2024

#1897 in Parser implementations

Download history 112/week @ 2024-01-04 2/week @ 2024-01-11 16/week @ 2024-01-18 7/week @ 2024-01-25 13/week @ 2024-02-01 8/week @ 2024-02-08 16/week @ 2024-02-15 384/week @ 2024-02-22 116/week @ 2024-02-29 31/week @ 2024-03-07 17/week @ 2024-03-14 25/week @ 2024-03-21 11/week @ 2024-03-28 42/week @ 2024-04-04 29/week @ 2024-04-11 23/week @ 2024-04-18

105 downloads per month
Used in 2 crates

Apache-2.0

27KB
515 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
~35K SLoC