Shallow clone of https://github.com/wooorm/markdown-rs
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
use markdown::mdast::{Node, Text};
|
||||
use mdast_util_to_markdown::to_markdown as to;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[test]
|
||||
fn text() {
|
||||
assert_eq!(
|
||||
to(&Node::Text(Text {
|
||||
value: String::new(),
|
||||
position: None,
|
||||
}))
|
||||
.unwrap(),
|
||||
"",
|
||||
"should support an empty text"
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
to(&Node::Text(Text {
|
||||
value: String::from("a\nb"),
|
||||
position: None,
|
||||
}))
|
||||
.unwrap(),
|
||||
"a\nb\n",
|
||||
"should support text"
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user