This commit is contained in:
Lukas Stancik
2026-04-04 09:40:28 +02:00
commit 5d3afabd24
218 changed files with 82634 additions and 0 deletions
+26
View File
@@ -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"
);
}