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/html_flow.rs | 306 ++++++++++++++++++++++++++--------------------------- 1 file changed, 153 insertions(+), 153 deletions(-) (limited to 'tests/html_flow.rs') diff --git a/tests/html_flow.rs b/tests/html_flow.rs index adeebf6..546cb13 100644 --- a/tests/html_flow.rs +++ b/tests/html_flow.rs @@ -1,7 +1,7 @@ -extern crate micromark; -use micromark::{ +extern crate markdown; +use markdown::{ mdast::{Html, Node, Root}, - micromark, micromark_to_mdast, micromark_with_options, + to_html, to_html_with_options, to_mdast, unist::Position, CompileOptions, Constructs, Options, ParseOptions, }; @@ -19,19 +19,19 @@ fn html_flow() -> Result<(), String> { }; assert_eq!( - micromark(""), + to_html(""), "<!-- asd -->", "should support a heading w/ rank 1" ); assert_eq!( - micromark_with_options("", &danger)?, + to_html_with_options("", &danger)?, "", "should support a heading w/ rank 1" ); assert_eq!( - micromark_with_options( + to_html_with_options( "", &Options { parse: ParseOptions { @@ -49,7 +49,7 @@ fn html_flow() -> Result<(), String> { ); assert_eq!( - micromark_to_mdast("
\nstuff\n
", &ParseOptions::default())?, + to_mdast("
\nstuff\n
", &ParseOptions::default())?, Node::Root(Root { children: vec![Node::Html(Html { value: "
\nstuff\n
".into(), @@ -75,7 +75,7 @@ fn html_flow_1_raw() -> Result<(), String> { }; assert_eq!( - micromark_with_options( + to_html_with_options( "

 import Text.HTML.TagSoup
 
@@ -96,7 +96,7 @@ main = print $ parseTags tags
     );
 
     assert_eq!(
-        micromark_with_options(
+        to_html_with_options(
             "1. *bar*", &danger)?,
+        to_html_with_options("1. *bar*", &danger)?,
         "1. *bar*",
         "should support raw tags w/ more data on ending line"
     );
 
     assert_eq!(
-        micromark_with_options("</script\nmore

", "should not support a raw closing tag" ); assert_eq!( - micromark_with_options("", &danger)?, + to_html_with_options("", &danger)?, "", "should support blank lines in raw" ); assert_eq!( - micromark_with_options(">