aboutsummaryrefslogtreecommitdiffstats
path: root/tests/thematic_break.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/thematic_break.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/thematic_break.rs b/tests/thematic_break.rs
index f4cb376..85ab37f 100644
--- a/tests/thematic_break.rs
+++ b/tests/thematic_break.rs
@@ -1,5 +1,8 @@
extern crate micromark;
-use micromark::{micromark, micromark_with_options, Constructs, Options};
+use micromark::{
+ mdast::{Node, Position, Root, ThematicBreak},
+ micromark, micromark_to_mdast, micromark_with_options, Constructs, Options,
+};
use pretty_assertions::assert_eq;
#[test]
@@ -181,5 +184,16 @@ fn thematic_break() -> Result<(), String> {
"should support turning off thematic breaks"
);
+ assert_eq!(
+ micromark_to_mdast("***", &Options::default())?,
+ Node::Root(Root {
+ children: vec![Node::ThematicBreak(ThematicBreak {
+ position: Some(Position::new(1, 1, 0, 1, 4, 3))
+ })],
+ position: Some(Position::new(1, 1, 0, 1, 4, 3))
+ }),
+ "should support thematic breaks as `ThematicBreak`s in mdast"
+ );
+
Ok(())
}