extern crate rhtml2md; use rhtml2md::parse_html; use pretty_assertions::assert_eq; use indoc::indoc; #[test] fn test_quotes() { let md = parse_html("

here's a quote\n next line of it
And some text after it

"); assert_eq!(md, "\ > here's a quote next line of it And some text after it") } #[test] fn test_quotes2() { let md = parse_html("

here's
nested quote!
a quote\n next line of it

"); assert_eq!(md, "\ > here's > > nested quote! > > a quote next line of it") } #[test] fn test_blockquotes() { let md = parse_html("
Quote at the start of the message
Should not crash the parser"); assert_eq!(md, "\ > Quote at the start of the message Should not crash the parser") } #[test] fn test_details() { let html = indoc! {"
There are more things in heaven and Earth, Horatio

Than are dreamt of in your philosophy

"}; let md = parse_html(&html); assert_eq!(md, "
There are more things in heaven and Earth, **Horatio**\n\nThan are dreamt of in your philosophy\n\n
") } #[test] fn test_subsup() { let md = parse_html("X2"); assert_eq!(md, r#"X2"#) }