Function mdka::from_html

source ·
pub fn from_html(html: &str) -> String
Expand description

Convert HTML to Markdown

use mdka::from_html;
 
let input = r#"
<h1>heading 1</h1>
<p>Hello, world.</p>
"#;
let expect = "# heading 1\n\nHello, world.\n\n";
let ret = from_html(input);
assert_eq!(ret, expect);