From ec2d1bfb4232178fb3a6cba36f138bc6efbbf34a Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Thu, 13 Oct 2022 10:40:01 +0200 Subject: Rename crate to `markdown` --- tests/hard_break_trailing.rs | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'tests/hard_break_trailing.rs') diff --git a/tests/hard_break_trailing.rs b/tests/hard_break_trailing.rs index c724c85..78f5550 100644 --- a/tests/hard_break_trailing.rs +++ b/tests/hard_break_trailing.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,109 +10,109 @@ use pretty_assertions::assert_eq; #[test] fn hard_break_trailing() -> Result<(), String> { assert_eq!( - micromark("foo \nbaz"), + to_html("foo \nbaz"), "

foo
\nbaz

", "should support two trailing spaces to form a hard break" ); assert_eq!( - micromark("foo \nbaz"), + to_html("foo \nbaz"), "

foo
\nbaz

", "should support multiple trailing spaces" ); assert_eq!( - micromark("foo \n bar"), + to_html("foo \n bar"), "

foo
\nbar

", "should support leading spaces after a trailing hard break" ); assert_eq!( - micromark("*foo \nbar*"), + to_html("*foo \nbar*"), "

foo
\nbar

", "should support trailing hard breaks in emphasis" ); assert_eq!( - micromark("`code \ntext`"), + to_html("`code \ntext`"), "

code text

", "should not support trailing hard breaks in code" ); assert_eq!( - micromark("foo "), + to_html("foo "), "

foo

", "should not support trailing hard breaks at the end of a paragraph" ); assert_eq!( - micromark("### foo "), + to_html("### foo "), "

foo

", "should not support trailing hard breaks at the end of a heading" ); assert_eq!( - micromark("aaa \t\nbb"), + to_html("aaa \t\nbb"), "

aaa\nbb

", "should support a mixed line suffix (1)" ); assert_eq!( - micromark("aaa\t \nbb"), + to_html("aaa\t \nbb"), "

aaa\nbb

", "should support a mixed line suffix (2)" ); assert_eq!( - micromark("aaa \t \nbb"), + to_html("aaa \t \nbb"), "

aaa\nbb

", "should support a mixed line suffix (3)" ); assert_eq!( - micromark("aaa\0 \nbb"), + to_html("aaa\0 \nbb"), "

aaa�
\nbb

", "should support a hard break after a replacement character" ); assert_eq!( - micromark("aaa\0\t\nbb"), + to_html("aaa\0\t\nbb"), "

aaa�\nbb

", "should support a line suffix after a replacement character" ); assert_eq!( - micromark("*a* \nbb"), + to_html("*a* \nbb"), "

a
\nbb

", "should support a hard break after a span" ); assert_eq!( - micromark("*a*\t\nbb"), + to_html("*a*\t\nbb"), "

a\nbb

", "should support a line suffix after a span" ); assert_eq!( - micromark("*a* \t\nbb"), + to_html("*a* \t\nbb"), "

a\nbb

", "should support a mixed line suffix after a span (1)" ); assert_eq!( - micromark("*a*\t \nbb"), + to_html("*a*\t \nbb"), "

a\nbb

", "should support a mixed line suffix after a span (2)" ); assert_eq!( - micromark("*a* \t \nbb"), + to_html("*a* \t \nbb"), "

a\nbb

", "should support a mixed line suffix after a span (3)" ); assert_eq!( - micromark_with_options( + to_html_with_options( "a \nb", &Options { parse: ParseOptions { @@ -130,7 +130,7 @@ fn hard_break_trailing() -> 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![ -- cgit