diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-10-13 10:40:01 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-10-13 10:40:01 +0200 |
commit | ec2d1bfb4232178fb3a6cba36f138bc6efbbf34a (patch) | |
tree | 2da4be3be22c2324c48cb17133b3f4b26b9139d2 /tests/hard_break_escape.rs | |
parent | 861af95c119721e814460fa7dc32bd3d74b38484 (diff) | |
download | markdown-rs-ec2d1bfb4232178fb3a6cba36f138bc6efbbf34a.tar.gz markdown-rs-ec2d1bfb4232178fb3a6cba36f138bc6efbbf34a.tar.bz2 markdown-rs-ec2d1bfb4232178fb3a6cba36f138bc6efbbf34a.zip |
Rename crate to `markdown`
Diffstat (limited to 'tests/hard_break_escape.rs')
-rw-r--r-- | tests/hard_break_escape.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/hard_break_escape.rs b/tests/hard_break_escape.rs index 9f17f10..44fe6ca 100644 --- a/tests/hard_break_escape.rs +++ b/tests/hard_break_escape.rs @@ -1,7 +1,7 @@ -extern crate micromark; -use micromark::{ +extern crate markdown; +use markdown::{ mdast::{Break, Node, Paragraph, Root, Text}, - micromark, micromark_to_mdast, micromark_with_options, + to_html, to_html_with_options, to_mdast, unist::Position, Constructs, Options, ParseOptions, }; @@ -10,43 +10,43 @@ use pretty_assertions::assert_eq; #[test] fn hard_break_escape() -> Result<(), String> { assert_eq!( - micromark("foo\\\nbaz"), + to_html("foo\\\nbaz"), "<p>foo<br />\nbaz</p>", "should support a backslash to form a hard break" ); assert_eq!( - micromark("foo\\\n bar"), + to_html("foo\\\n bar"), "<p>foo<br />\nbar</p>", "should support leading spaces after an escape hard break" ); assert_eq!( - micromark("*foo\\\nbar*"), + to_html("*foo\\\nbar*"), "<p><em>foo<br />\nbar</em></p>", "should support escape hard breaks in emphasis" ); assert_eq!( - micromark("``code\\\ntext``"), + to_html("``code\\\ntext``"), "<p><code>code\\ text</code></p>", "should not support escape hard breaks in code" ); assert_eq!( - micromark("foo\\"), + to_html("foo\\"), "<p>foo\\</p>", "should not support escape hard breaks at the end of a paragraph" ); assert_eq!( - micromark("### foo\\"), + to_html("### foo\\"), "<h3>foo\\</h3>", "should not support escape hard breaks at the end of a heading" ); assert_eq!( - micromark_with_options( + to_html_with_options( "a\\\nb", &Options { parse: ParseOptions { @@ -64,7 +64,7 @@ fn hard_break_escape() -> Result<(), String> { ); assert_eq!( - micromark_to_mdast("a\\\nb.", &ParseOptions::default())?, + to_mdast("a\\\nb.", &ParseOptions::default())?, Node::Root(Root { children: vec![Node::Paragraph(Paragraph { children: vec![ |