From ec2d1bfb4232178fb3a6cba36f138bc6efbbf34a Mon Sep 17 00:00:00 2001
From: Titus Wormer foo bar a * foo bar* a*"foo"* * a * foobar 5678 foo bar _ foo bar_ a_"foo"_ foo_bar_ 5_6_78 пристаням_стремятся_ aa_"bb"_cc foo-(bar) _foo* *foo bar * *foo bar\n* *(*foo) (foo) _foo bar _ _(_foo) (foo) _foo_bar _пристаням_стремятся foo_bar_baz (bar). foo bar ** foo bar** a**"foo"** foobar foo bar __ foo bar__ __\nfoo bar__ a__"foo"__ foo__bar__ 5__6__78 пристаням__стремятся__ foo, bar, baz foo-(bar) **foo bar ** **(**foo) (foo) Gomphocarpus (Gomphocarpus physocarpus, syn.\nAsclepias physocarpa) foo "bar" foo foobar __foo bar __ __(__foo) (foo) __foo__bar __пристаням__стремятся foo__bar__baz (bar). foo bar foo\nbar foo bar baz foo bar baz foo bar foo bar foo bar baz foobarbaz foo**bar foo bar foo bar foobar foobarbaz foobar***baz foo bar baz bim bop foo bar ** is not an empty emphasis **** is not an empty emphasis foo bar foo\nbar foo bar baz foo bar baz foo bar foo bar foo bar baz foobarbaz foo bar foo bar foo bar baz\nbim bop foo bar __ is not an empty emphasis ____ is not an empty emphasis foo *** foo * foo _ foo ***** foo * foo _ *foo foo* *foo ***foo foo* foo*** foo ___ foo _ foo X foo _____ foo _ foo X _foo foo_ _foo ___foo foo_ foo___ foo foo foo foo foo foo foo foo foo foo _bar baz_ foo bar *baz bim bam **foo bar baz *foo bar baz *bar* _bar_ * * a a http://foo.bar.baz/test?q=hello&id=22&boolean <http://foo.bar/baz bim> <foo+@bar.example.com> <> < http://foo.bar > <m:abc> <foo.bar.baz> http://example.com foo@bar.example.com <aaa©@example.com> <a*a©@example.com> <asd@.example.com> <asd@e..xample.com> asd@012345678901234567890123456789012345678901234567890123456789012 <asd@0123456789012345678901234567890123456789012345678901234567890123> asd@012345678901234567890123456789012345678901234567890123456789012.a <asd@0123456789012345678901234567890123456789012345678901234567890123.a> asd@a.012345678901234567890123456789012345678901234567890123456789012 <asd@a.0123456789012345678901234567890123456789012345678901234567890123> <asd@-example.com> <asd@example-.com> b\nc b\nc b\nc b\nc a\nb\nc a a a a\n- b [\na c a a b a\nb a b a b a b a\nb a b a b a\nb a\nb\nc b !"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ \\→\\A\\a\\ \\3\\φ\\« *not emphasized*\n<br/> not a tag\n[not a link](/foo)\n`not code`\n1. not a list\n* not a list\n# not a heading\n[foo]: /url "not a reference"\nö not a character entity foo \u{a0} & © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸ # Ӓ Ϡ � " ആ ಫ   &x; &#; &#x;\n�\n&#abcdef0;\n&ThisIsNotDefined; &hi?; © &MadeUpEntity; *foo*\nfoo * foo [a](url "tit") foo\n\nbar \tfoo ∳ � � &CounterClockwiseContourIntegrali; � � &-; &#-; &#x-; <-; 	-; 	-; bbb foo baz a b a foo bar foo Foo\nbar bar b a\nb a\nb a\nb a a\nb *foo [not a ```foo`` `foo `foo `", &danger)?,
+ to_html_with_options("*
", &danger)?,
"
", &danger)?,
+ to_html_with_options("*
", &danger)?,
"
*_\n
",
"should support block quotes"
);
assert_eq!(
- micromark("># a\n>b\n> c"),
+ to_html("># a\n>b\n> c"),
"a
\n\n
",
"should support block quotes w/o space"
);
assert_eq!(
- micromark(" > # a\n > b\n > c"),
+ to_html(" > # a\n > b\n > c"),
"a
\n\n
",
"should support prefixing block quotes w/ spaces"
);
assert_eq!(
- micromark(" > # a\n > b\n > c"),
+ to_html(" > # a\n > b\n > c"),
"a
\n
",
"should not support block quotes w/ 4 spaces"
);
assert_eq!(
- micromark("> # a\n> b\nc"),
+ to_html("> # a\n> b\nc"),
"> # a\n> b\n> c\n\n
",
"should support lazy content lines"
);
assert_eq!(
- micromark("> a\nb\n> c"),
+ to_html("> a\nb\n> c"),
"a
\n\n
",
"should support lazy content lines inside block quotes"
);
assert_eq!(
- micromark("> a\n> ---"),
+ to_html("> a\n> ---"),
"\n
",
"should support setext headings underlines in block quotes"
);
assert_eq!(
- micromark("> a\n---"),
+ to_html("> a\n---"),
"a
\n\n
\n
",
"should not support lazy setext headings underlines in block quotes"
);
assert_eq!(
- micromark("> - a\n> - b"),
+ to_html("> - a\n> - b"),
"\n
",
"should support lists in block quotes"
);
assert_eq!(
- micromark("> - a\n- b"),
+ to_html("> - a\n- b"),
"\n
\n\n
\n\n
\n\n
",
"should not support lazy lists in block quotes"
);
assert_eq!(
- micromark("> a\n b"),
+ to_html("> a\n b"),
"\n
\n
\na\n
",
"should not support lazy indented code in block quotes"
);
assert_eq!(
- micromark("> ```\na\n```"),
+ to_html("> ```\na\n```"),
"b\n\n
\n
\n
\n",
"should not support lazy fenced code in block quotes (1)"
);
assert_eq!(
- micromark("> a\n```\nb"),
+ to_html("> a\n```\nb"),
"\n
\n
\n",
"should not support lazy fenced code in block quotes (2)"
);
assert_eq!(
- micromark("> a\n - b"),
+ to_html("> a\n - b"),
"b\n\n
",
"should not support lazy indented code (or lazy list) in block quotes"
);
assert_eq!(
- micromark("> [\na"),
+ to_html("> [\na"),
"\n
",
"should support lazy, definition-like lines"
);
assert_eq!(
- micromark("> [a]: b\nc"),
+ to_html("> [a]: b\nc"),
"\n
",
"should support a definition, followed by a lazy paragraph"
);
assert_eq!(
- micromark(">"),
+ to_html(">"),
"\n
",
"should support empty block quotes (1)"
);
assert_eq!(
- micromark(">\n> \n> "),
+ to_html(">\n> \n> "),
"\n
",
"should support empty block quotes (2)"
);
assert_eq!(
- micromark(">\n> a\n> "),
+ to_html(">\n> a\n> "),
"\n
",
"should support initial or final lazy empty block quote lines"
);
assert_eq!(
- micromark("> a\n\n> b"),
+ to_html("> a\n\n> b"),
"\n
\n\n
",
"should support adjacent block quotes"
);
assert_eq!(
- micromark("> a\n> b"),
+ to_html("> a\n> b"),
"\n
",
"should support a paragraph in a block quote"
);
assert_eq!(
- micromark("> a\n>\n> b"),
+ to_html("> a\n>\n> b"),
"\n
",
"should support adjacent paragraphs in block quotes"
);
assert_eq!(
- micromark("[a]\n\n> [a]: b"),
+ to_html("[a]\n\n> [a]: b"),
"\n\n
",
"should support a definition in a block quote (1)"
);
assert_eq!(
- micromark("> [a]: b\n\n[a]"),
+ to_html("> [a]: b\n\n[a]"),
"\n
\n",
"should support a definition in a block quote (2)"
);
assert_eq!(
- micromark("a\n> b"),
+ to_html("a\n> b"),
"\n
",
"should support interrupting paragraphs w/ block quotes"
);
assert_eq!(
- micromark("> a\n***\n> b"),
+ to_html("> a\n***\n> b"),
"\n
\n
\n\n
",
"should support interrupting block quotes w/ thematic breaks"
);
assert_eq!(
- micromark("> a\nb"),
+ to_html("> a\nb"),
"\n
",
"should not support interrupting block quotes w/ paragraphs"
);
assert_eq!(
- micromark("> a\n\nb"),
+ to_html("> a\n\nb"),
"\n
\n\n
\n\n
",
"should not support interrupting many block quotes w/ paragraphs (1)"
);
assert_eq!(
- micromark(">>> a\n> b\n>>c"),
+ to_html(">>> a\n> b\n>>c"),
"\n
\n\n
\n\n
",
"should not support interrupting many block quotes w/ paragraphs (2)"
);
assert_eq!(
- micromark("> a\n\n> b"),
+ to_html("> a\n\n> b"),
"\n
\n\n
\n\n
\n
\na\n\n
",
"should support 5 spaces for indented code, not 4"
);
assert_eq!(
- micromark_with_options(
+ to_html_with_options(
"> # a\n> b\n> c",
&Options {
parse: ParseOptions {
@@ -220,7 +220,7 @@ fn block_quote() -> Result<(), String> {
);
assert_eq!(
- micromark_to_mdast("> a", &ParseOptions::default())?,
+ to_mdast("> a", &ParseOptions::default())?,
Node::Root(Root {
children: vec![Node::BlockQuote(BlockQuote {
children: vec![Node::Paragraph(Paragraph {
diff --git a/tests/character_escape.rs b/tests/character_escape.rs
index c5c9004..0546269 100644
--- a/tests/character_escape.rs
+++ b/tests/character_escape.rs
@@ -1,7 +1,7 @@
-extern crate micromark;
-use micromark::{
+extern crate markdown;
+use markdown::{
mdast::{Node, Paragraph, Root, Text},
- micromark, micromark_to_mdast, micromark_with_options,
+ to_html, to_html_with_options, to_mdast,
unist::Position,
CompileOptions, Constructs, Options, ParseOptions,
};
@@ -19,75 +19,75 @@ fn character_escape() -> Result<(), String> {
};
assert_eq!(
- micromark(
+ to_html(
"\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\-\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\\\\\]\\^\\_\\`\\{\\|\\}\\~"),
"
not a tag\n\\[not a link](/foo)\n\\`not code`\n1\\. not a list\n\\* not a list\n\\# not a heading\n\\[foo]: /url \"not a reference\"\n\\ö not a character entity"),
"
\nbar\\[\\`
",
"should not escape in indented code"
);
assert_eq!(
- micromark("\\[\\]\n
",
"should escape in fenced code info"
);
assert_eq!(
- micromark_with_options(
+ to_html_with_options(
"\\> a",
&Options {
parse: ParseOptions {
@@ -105,7 +105,7 @@ fn character_escape() -> Result<(), String> {
);
assert_eq!(
- micromark_to_mdast("a \\* b", &ParseOptions::default())?,
+ to_mdast("a \\* b", &ParseOptions::default())?,
Node::Root(Root {
children: vec![Node::Paragraph(Paragraph {
children: vec![Node::Text(Text {
diff --git a/tests/character_reference.rs b/tests/character_reference.rs
index 4e9a436..2d5c6df 100644
--- a/tests/character_reference.rs
+++ b/tests/character_reference.rs
@@ -1,7 +1,7 @@
-extern crate micromark;
-use micromark::{
+extern crate markdown;
+use markdown::{
mdast::{Node, Paragraph, Root, Text},
- micromark, micromark_to_mdast, micromark_with_options,
+ to_html, to_html_with_options, to_mdast,
unist::Position,
CompileOptions, Constructs, Options, ParseOptions,
};
@@ -10,7 +10,7 @@ use pretty_assertions::assert_eq;
#[test]
fn character_reference() -> Result<(), String> {
assert_eq!(
- micromark(
+ to_html(
" & © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸"
),
"foo\n
",
"should support character references in code language"
);
assert_eq!(
- micromark("`föö`"),
+ to_html("`föö`"),
"foo\nföö
",
"should not support character references in indented code"
);
assert_eq!(
- micromark("*foo*\n*foo*"),
+ to_html("*foo*\n*foo*"),
"föfö\n\n
",
"should not support character references as construct markers (2)"
);
assert_eq!(
- micromark("[a](url "tit")"),
+ to_html("[a](url "tit")"),
"
",
"should support fenced code w/ grave accents"
);
assert_eq!(
- micromark("~~~\n<\n >\n~~~"),
+ to_html("~~~\n<\n >\n~~~"),
"<\n >\n
",
"should support fenced code w/ tildes"
);
assert_eq!(
- micromark("``\nfoo\n``"),
+ to_html("``\nfoo\n``"),
"<\n >\nfoo
",
"should not support a tilde closing sequence for a grave accent opening sequence"
);
assert_eq!(
- micromark("~~~\naaa\n```\n~~~"),
+ to_html("~~~\naaa\n```\n~~~"),
"aaa\n~~~\n
",
"should not support a grave accent closing sequence for a tilde opening sequence"
);
assert_eq!(
- micromark("````\naaa\n```\n``````"),
+ to_html("````\naaa\n```\n``````"),
"aaa\n```\n
",
"should support a closing sequence longer, but not shorter than, the opening"
);
assert_eq!(
- micromark("~~~~\naaa\n~~~\n~~~~"),
+ to_html("~~~~\naaa\n~~~\n~~~~"),
"aaa\n```\n
",
"should support a closing sequence equal to, but not shorter than, the opening"
);
assert_eq!(
- micromark("```"),
+ to_html("```"),
"aaa\n~~~\n
\n",
"should support an eof right after an opening sequence"
);
assert_eq!(
- micromark("`````\n\n```\naaa\n"),
+ to_html("`````\n\n```\naaa\n"),
"
\n",
"should support an eof somewhere in content"
);
assert_eq!(
- micromark("> ```\n> aaa\n\nbbb"),
+ to_html("> ```\n> aaa\n\nbbb"),
"\n```\naaa\n\n
\n
\naaa\n
",
"should support blank lines in fenced code"
);
assert_eq!(
- micromark("```\n```"),
+ to_html("```\n```"),
"\n \n
",
"should support empty fenced code"
);
assert_eq!(
- micromark(" ```\n aaa\naaa\n```"),
+ to_html(" ```\n aaa\naaa\n```"),
"
",
"should remove up to one space from the content if the opening sequence is indented w/ 1 space"
);
assert_eq!(
- micromark(" ```\naaa\n aaa\naaa\n ```"),
+ to_html(" ```\naaa\n aaa\naaa\n ```"),
"aaa\naaa\n
",
"should remove up to two space from the content if the opening sequence is indented w/ 2 spaces"
);
assert_eq!(
- micromark(" ```\n aaa\n aaa\n aaa\n ```"),
+ to_html(" ```\n aaa\n aaa\n aaa\n ```"),
"aaa\naaa\naaa\n
",
"should remove up to three space from the content if the opening sequence is indented w/ 3 spaces"
);
assert_eq!(
- micromark(" ```\n aaa\n ```"),
+ to_html(" ```\n aaa\n ```"),
"aaa\n aaa\naaa\n
",
"should not support indenteding the opening sequence w/ 4 spaces"
);
assert_eq!(
- micromark("```\naaa\n ```"),
+ to_html("```\naaa\n ```"),
"```\naaa\n```\n
",
"should support an indented closing sequence"
);
assert_eq!(
- micromark(" ```\naaa\n ```"),
+ to_html(" ```\naaa\n ```"),
"aaa\n
",
"should support a differently indented closing sequence than the opening sequence"
);
assert_eq!(
- micromark("```\naaa\n ```\n"),
+ to_html("```\naaa\n ```\n"),
"aaa\n
\n",
"should not support an indented closing sequence w/ 4 spaces"
);
assert_eq!(
- micromark("``` ```\naaa"),
+ to_html("``` ```\naaa"),
"aaa\n ```\n \naaa
\n",
"should not support spaces in the closing sequence"
);
assert_eq!(
- micromark("foo\n```\nbar\n```\nbaz"),
+ to_html("foo\n```\nbar\n```\nbaz"),
"aaa\n~~~ ~~\n
\nbar\nfoo
\n
\nbar\nbaz
",
"should support interrupting other content"
);
assert_eq!(
- micromark("```ruby\ndef foo(x)\n return 3\nend\n```"),
+ to_html("```ruby\ndef foo(x)\n return 3\nend\n```"),
"
",
"should support the info string as a `language-` class (1)"
);
assert_eq!(
- micromark("````;\n````"),
+ to_html("````;\n````"),
"def foo(x)\n return 3\nend\n
",
"should support the info string as a `language-` class (2)"
);
assert_eq!(
- micromark("~~~~ ruby startline=3 $%@#$\ndef foo(x)\n return 3\nend\n~~~~~~~"),
+ to_html("~~~~ ruby startline=3 $%@#$\ndef foo(x)\n return 3\nend\n~~~~~~~"),
"
",
"should support the info string as a `language-` class, but not the meta string"
);
assert_eq!(
- micromark("``` aa ```\nfoo"),
+ to_html("``` aa ```\nfoo"),
"def foo(x)\n return 3\nend\naa\nfoo
",
"should support grave accents and tildes in the meta string of tilde fenced code"
);
assert_eq!(
- micromark("```\n``` aaa\n```"),
+ to_html("```\n``` aaa\n```"),
"foo\n
",
"should not support info string on closing sequences"
);
// Our own:
assert_eq!(
- micromark("``` "),
+ to_html("``` "),
"``` aaa\n
\n",
"should support an eof after whitespace, after the start fence sequence"
);
assert_eq!(
- micromark("``` js\nalert(1)\n```"),
+ to_html("``` js\nalert(1)\n```"),
"
",
"should support whitespace between the sequence and the info string"
);
assert_eq!(
- micromark("```js"),
+ to_html("```js"),
"alert(1)\n
\n",
"should support an eof after the info string"
);
assert_eq!(
- micromark("``` js \nalert(1)\n```"),
+ to_html("``` js \nalert(1)\n```"),
"
",
"should support whitespace after the info string"
);
assert_eq!(
- micromark("```\n "),
+ to_html("```\n "),
"alert(1)\n
\n",
"should support an eof after whitespace in content"
);
assert_eq!(
- micromark(" ```\n "),
+ to_html(" ```\n "),
" \n
\n",
"should support an eof in the prefix, in content"
);
assert_eq!(
- micromark("```j\\+s©"),
+ to_html("```j\\+s©"),
"
\n",
"should support character escapes and character references in info strings"
);
assert_eq!(
- micromark("```a\\&b\0c"),
+ to_html("```a\\&b\0c"),
"
\n",
"should encode dangerous characters in languages"
);
assert_eq!(
- micromark(" ```\naaa\n ```"),
+ to_html(" ```\naaa\n ```"),
"
\n",
"should not support a closing sequence w/ too much indent, regardless of opening sequence (1)"
);
assert_eq!(
- micromark("> ```\n>\n>\n>\n\na"),
+ to_html("> ```\n>\n>\n>\n\na"),
"aaa\n ```\n\n
\n
\n\n\n\n\n
\n
\n\n
\n
\n",
"should not support lazyness (2)"
);
assert_eq!(
- micromark("> ```a\n```"),
+ to_html("> ```a\n```"),
"\n
\n
\n
\n",
"should not support lazyness (3)"
);
assert_eq!(
- micromark_with_options(
+ to_html_with_options(
"```",
&Options {
parse: ParseOptions {
@@ -281,7 +281,7 @@ fn code_fenced() -> Result<(), String> {
);
assert_eq!(
- micromark_to_mdast(
+ to_mdast(
"```js extra\nconsole.log(1)\nconsole.log(2)\n```",
&ParseOptions::default()
)?,
@@ -298,7 +298,7 @@ fn code_fenced() -> Result<(), String> {
);
assert_eq!(
- micromark_to_mdast("```\nasd", &ParseOptions::default())?,
+ to_mdast("```\nasd", &ParseOptions::default())?,
Node::Root(Root {
children: vec![Node::Code(Code {
lang: None,
diff --git a/tests/code_indented.rs b/tests/code_indented.rs
index b02b092..6545ed6 100644
--- a/tests/code_indented.rs
+++ b/tests/code_indented.rs
@@ -1,7 +1,7 @@
-extern crate micromark;
-use micromark::{
+extern crate markdown;
+use markdown::{
mdast::{Code, Node, Root},
- micromark, micromark_to_mdast, micromark_with_options,
+ to_html, to_html_with_options, to_mdast,
unist::Position,
CompileOptions, Constructs, Options, ParseOptions,
};
@@ -10,115 +10,115 @@ use pretty_assertions::assert_eq;
#[test]
fn code_indented() -> Result<(), String> {
assert_eq!(
- micromark(" a simple\n indented code block"),
+ to_html(" a simple\n indented code block"),
"
",
"should support indented code"
);
assert_eq!(
- micromark(" - foo\n\n bar"),
+ to_html(" - foo\n\n bar"),
"a simple\n indented code block\n\n
",
"should prefer list item content over indented code (1)"
);
assert_eq!(
- micromark("1. foo\n\n - bar"),
+ to_html("1. foo\n\n - bar"),
"\n
",
"should prefer list item content over indented code (2)"
);
assert_eq!(
- micromark(" \n *hi*\n\n - one"),
+ to_html(" \n *hi*\n\n - one"),
"\n
\n
",
"should support blank lines in indented code (1)"
);
assert_eq!(
- micromark(" chunk1\n\n chunk2\n \n \n \n chunk3"),
+ to_html(" chunk1\n\n chunk2\n \n \n \n chunk3"),
"<a/>\n*hi*\n\n- one\n
",
"should support blank lines in indented code (2)"
);
assert_eq!(
- micromark(" chunk1\n \n chunk2"),
+ to_html(" chunk1\n \n chunk2"),
"chunk1\n\nchunk2\n\n\n\nchunk3\n
",
"should support blank lines in indented code (3)"
);
assert_eq!(
- micromark("Foo\n bar"),
+ to_html("Foo\n bar"),
"chunk1\n \n chunk2\n
\nfoo\nHeading
\n
\nfoo\nHeading
\n
\nfoo\n
",
"should mix w/ other content"
);
assert_eq!(
- micromark(" foo\n bar"),
+ to_html(" foo\n bar"),
"
",
"should support extra whitespace on the first line"
);
assert_eq!(
- micromark("\n \n foo\n "),
+ to_html("\n \n foo\n "),
" foo\nbar\n
",
"should not support initial blank lines"
);
assert_eq!(
- micromark(" foo "),
+ to_html(" foo "),
"foo\n
",
"should support trailing whitespace"
);
assert_eq!(
- micromark("> a\nb"),
+ to_html("> a\nb"),
"foo \n\n
\n
\na\n\n
",
"should not support lazyness (2)"
);
assert_eq!(
- micromark("> a\n b"),
+ to_html("> a\n b"),
"\n
",
"should not support lazyness (3)"
);
assert_eq!(
- micromark("> a\n b"),
+ to_html("> a\n b"),
"\n
",
"should not support lazyness (4)"
);
assert_eq!(
- micromark("> a\n b"),
+ to_html("> a\n b"),
"\n
\n
\na\n
",
"should not support lazyness (5)"
);
assert_eq!(
- micromark("> a\n b"),
+ to_html("> a\n b"),
"b\n\n
\n
\na\n
",
"should not support lazyness (6)"
);
assert_eq!(
- micromark("> a\n b"),
+ to_html("> a\n b"),
" b\n\n
\n
\na\n
",
"should not support lazyness (7)"
);
@@ -135,43 +135,43 @@ fn code_indented() -> Result<(), String> {
};
assert_eq!(
- micromark_with_options(" a", &off)?,
+ to_html_with_options(" a", &off)?,
" b\n\n
",
"should support turning off code (indented, 2)"
);
assert_eq!(
- micromark_with_options("- a\n b", &off)?,
+ to_html_with_options("- a\n b", &off)?,
"\n
",
"should support turning off code (indented, 3)"
);
assert_eq!(
- micromark_with_options("- a\n - b", &off)?,
+ to_html_with_options("- a\n - b", &off)?,
"\n
",
"should support turning off code (indented, 4)"
);
assert_eq!(
- micromark_with_options("- a\n - b", &off)?,
+ to_html_with_options("- a\n - b", &off)?,
"\n
\n\n
",
"should support turning off code (indented, 5)"
);
assert_eq!(
- micromark_with_options("```\na\n ```", &off)?,
+ to_html_with_options("```\na\n ```", &off)?,
"\n
\n
",
"should support turning off code (indented, 6)"
);
assert_eq!(
- micromark_with_options(
+ to_html_with_options(
"a \n ?>",
&Options {
parse: ParseOptions {
@@ -192,19 +192,19 @@ fn code_indented() -> Result<(), String> {
);
assert_eq!(
- micromark_with_options("- Foo\n---", &off)?,
+ to_html_with_options("- Foo\n---", &off)?,
"a\n\n
\n
",
"should support turning off code (indented, 8)"
);
assert_eq!(
- micromark_with_options("- Foo\n ---", &off)?,
+ to_html_with_options("- Foo\n ---", &off)?,
"\n
",
"should support turning off code (indented, 9)"
);
assert_eq!(
- micromark_to_mdast(
+ to_mdast(
"\tconsole.log(1)\n console.log(2)\n",
&ParseOptions::default()
)?,
diff --git a/tests/code_text.rs b/tests/code_text.rs
index 89fa63f..2784398 100644
--- a/tests/code_text.rs
+++ b/tests/code_text.rs
@@ -1,7 +1,7 @@
-extern crate micromark;
-use micromark::{
+extern crate markdown;
+use markdown::{
mdast::{InlineCode, Node, Paragraph, Root, Text},
- micromark, micromark_to_mdast, micromark_with_options,
+ to_html, to_html_with_options, to_mdast,
unist::Position,
CompileOptions, Constructs, Options, ParseOptions,
};
@@ -19,152 +19,152 @@ fn code_text() -> Result<(), String> {
};
assert_eq!(
- micromark("`foo`"),
+ to_html("`foo`"),
"Foo
\nfoofoo ` bar`` `` a\u{a0}b\u{a0} \n foo bar bazfoo foo bar bazfoo\\bar`foo`barfoo `` bar*link](/foo)<a href="">`<http://foo.bar.baz>`barfoo\t\tbarx
not a tag
\[not a link](/foo)
@@ -233,7 +233,7 @@ bar
);
assert_eq!(
- micromark_with_options(
+ to_html_with_options(
r###"\\*emphasis*
"###,
&danger
@@ -244,7 +244,7 @@ bar
);
assert_eq!(
- micromark_with_options(
+ to_html_with_options(
r###"foo\
bar
"###,
@@ -257,7 +257,7 @@ bar