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_escape.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'tests/hard_break_escape.rs') 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"), "

foo
\nbaz

", "should support a backslash to form a hard break" ); assert_eq!( - micromark("foo\\\n bar"), + to_html("foo\\\n bar"), "

foo
\nbar

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

foo
\nbar

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

code\\ text

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

foo\\

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

foo\\

", "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![ -- cgit