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

#2229 in Parser implementations

Download history 17/week @ 2024-08-14 21/week @ 2024-08-21 71/week @ 2024-08-28 229/week @ 2024-09-04 254/week @ 2024-09-11 196/week @ 2024-09-18 276/week @ 2024-09-25 331/week @ 2024-10-02 162/week @ 2024-10-09 82/week @ 2024-10-16 37/week @ 2024-10-23 40/week @ 2024-10-30 191/week @ 2024-11-06 301/week @ 2024-11-13 134/week @ 2024-11-20 150/week @ 2024-11-27

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

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–6MB
~34K SLoC