diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-15 19:26:40 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-15 19:26:40 +0200 |
commit | b6342221eb3cacda6e893d7d35bf291944c664d9 (patch) | |
tree | c357814b6f0248191e00f4e19dc27b178b9b13ed /tests/commonmark.rs | |
parent | de270932ff0528b3e07c8dd7aad5adbd040e07fe (diff) | |
download | markdown-rs-b6342221eb3cacda6e893d7d35bf291944c664d9.tar.gz markdown-rs-b6342221eb3cacda6e893d7d35bf291944c664d9.tar.bz2 markdown-rs-b6342221eb3cacda6e893d7d35bf291944c664d9.zip |
Fix formatting of `commonmark` tests
Diffstat (limited to 'tests/commonmark.rs')
-rw-r--r-- | tests/commonmark.rs | 6856 |
1 files changed, 2464 insertions, 4392 deletions
diff --git a/tests/commonmark.rs b/tests/commonmark.rs index 79be42a..cec6116 100644 --- a/tests/commonmark.rs +++ b/tests/commonmark.rs @@ -12,54 +12,43 @@ const DANGER: &Options = &Options { default_line_ending: None, }; +#[rustfmt::skip] #[test] fn commonmark() { assert_eq!( - micromark_with_options( - r###" foo baz bim -"###, - DANGER - ), + micromark_with_options(r###" foo baz bim +"###, DANGER), r###"<pre><code>foo baz bim </code></pre> "###, r###"Tabs (0)"### - ); +); assert_eq!( - micromark_with_options( - r###" foo baz bim -"###, - DANGER - ), + micromark_with_options(r###" foo baz bim +"###, DANGER), r###"<pre><code>foo baz bim </code></pre> "###, r###"Tabs (1)"### - ); +); assert_eq!( - micromark_with_options( - r###" a a + micromark_with_options(r###" a a ὐ a -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>a a ὐ a </code></pre> "###, r###"Tabs (2)"### - ); +); assert_eq!( - micromark_with_options( - r###" - foo + micromark_with_options(r###" - foo bar -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li> <p>foo</p> @@ -68,16 +57,13 @@ fn commonmark() { </ul> "###, r###"Tabs (3)"### - ); +); assert_eq!( - micromark_with_options( - r###"- foo + micromark_with_options(r###"- foo bar -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li> <p>foo</p> @@ -87,28 +73,22 @@ fn commonmark() { </ul> "###, r###"Tabs (4)"### - ); +); assert_eq!( - micromark_with_options( - r###"> foo -"###, - DANGER - ), + micromark_with_options(r###"> foo +"###, DANGER), r###"<blockquote> <pre><code> foo </code></pre> </blockquote> "###, r###"Tabs (5)"### - ); +); assert_eq!( - micromark_with_options( - r###"- foo -"###, - DANGER - ), + micromark_with_options(r###"- foo +"###, DANGER), r###"<ul> <li> <pre><code> foo @@ -117,90 +97,73 @@ fn commonmark() { </ul> "###, r###"Tabs (6)"### - ); +); assert_eq!( - micromark_with_options( - r###" foo + micromark_with_options(r###" foo bar -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>foo bar </code></pre> "###, r###"Tabs (7)"### - ); - - // To do: eol after containers. - // assert_eq!( - // micromark_with_options(r###" - foo - // - bar - // - baz - // "###, DANGER), - // r###"<ul> - // <li>foo - // <ul> - // <li>bar - // <ul> - // <li>baz</li> - // </ul> - // </li> - // </ul> - // </li> - // </ul> - // "###, - // r###"Tabs (8)"### - // ); +); assert_eq!( - micromark_with_options( - r###"# Foo + micromark_with_options(r###" - foo + - bar + - baz +"###, DANGER), + r###"<ul> +<li>foo +<ul> +<li>bar +<ul> +<li>baz</li> +</ul> +</li> +</ul> +</li> +</ul> "###, - DANGER - ), + r###"Tabs (8)"### +); + + assert_eq!( + micromark_with_options(r###"# Foo +"###, DANGER), r###"<h1>Foo</h1> "###, r###"Tabs (9)"### - ); +); assert_eq!( - micromark_with_options( - r###"* * * -"###, - DANGER - ), + micromark_with_options(r###"* * * +"###, DANGER), r###"<hr /> "###, r###"Tabs (10)"### - ); +); assert_eq!( - micromark_with_options( - r###"\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~ -"###, - DANGER - ), + micromark_with_options(r###"\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~ +"###, DANGER), r###"<p>!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~</p> "###, r###"Backslash escapes (11)"### - ); +); assert_eq!( - micromark_with_options( - r###"\ \A\a\ \3\φ\« -"###, - DANGER - ), + micromark_with_options(r###"\ \A\a\ \3\φ\« +"###, DANGER), r###"<p>\ \A\a\ \3\φ\«</p> "###, r###"Backslash escapes (12)"### - ); +); assert_eq!( - micromark_with_options( - r###"\*not emphasized* + micromark_with_options(r###"\*not emphasized* \<br/> not a tag \[not a link](/foo) \`not code` @@ -209,9 +172,7 @@ bar \# not a heading \[foo]: /url "not a reference" \ö not a character entity -"###, - DANGER - ), +"###, DANGER), r###"<p>*not emphasized* <br/> not a tag [not a link](/foo) @@ -223,597 +184,464 @@ bar &ouml; not a character entity</p> "###, r###"Backslash escapes (13)"### - ); +); assert_eq!( - micromark_with_options( - r###"\\*emphasis* -"###, - DANGER - ), + micromark_with_options(r###"\\*emphasis* +"###, DANGER), r###"<p>\<em>emphasis</em></p> "###, r###"Backslash escapes (14)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo\ + micromark_with_options(r###"foo\ bar -"###, - DANGER - ), +"###, DANGER), r###"<p>foo<br /> bar</p> "###, r###"Backslash escapes (15)"### - ); +); assert_eq!( - micromark_with_options( - r###"`` \[\` `` -"###, - DANGER - ), + micromark_with_options(r###"`` \[\` `` +"###, DANGER), r###"<p><code>\[\`</code></p> "###, r###"Backslash escapes (16)"### - ); +); assert_eq!( - micromark_with_options( - r###" \[\] -"###, - DANGER - ), + micromark_with_options(r###" \[\] +"###, DANGER), r###"<pre><code>\[\] </code></pre> "###, r###"Backslash escapes (17)"### - ); +); assert_eq!( - micromark_with_options( - r###"~~~ + micromark_with_options(r###"~~~ \[\] ~~~ -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>\[\] </code></pre> "###, r###"Backslash escapes (18)"### - ); +); assert_eq!( - micromark_with_options( - r###"<http://example.com?find=\*> -"###, - DANGER - ), + micromark_with_options(r###"<http://example.com?find=\*> +"###, DANGER), r###"<p><a href="http://example.com?find=%5C*">http://example.com?find=\*</a></p> "###, r###"Backslash escapes (19)"### - ); +); assert_eq!( - micromark_with_options( - r###"<a href="/bar\/)"> -"###, - DANGER - ), + micromark_with_options(r###"<a href="/bar\/)"> +"###, DANGER), r###"<a href="/bar\/)"> "###, r###"Backslash escapes (20)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo](/bar\* "ti\*tle") -"###, - DANGER - ), + micromark_with_options(r###"[foo](/bar\* "ti\*tle") +"###, DANGER), r###"<p><a href="/bar*" title="ti*tle">foo</a></p> "###, r###"Backslash escapes (21)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo] + micromark_with_options(r###"[foo] [foo]: /bar\* "ti\*tle" -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/bar*" title="ti*tle">foo</a></p> "###, r###"Backslash escapes (22)"### - ); +); assert_eq!( - micromark_with_options( - r###"``` foo\+bar + micromark_with_options(r###"``` foo\+bar foo ``` -"###, - DANGER - ), +"###, DANGER), r###"<pre><code class="language-foo+bar">foo </code></pre> "###, r###"Backslash escapes (23)"### - ); +); assert_eq!( - micromark_with_options( - r###" & © Æ Ď + micromark_with_options(r###" & © Æ Ď ¾ ℋ ⅆ ∲ ≧̸ -"###, - DANGER - ), +"###, DANGER), r###"<p> & © Æ Ď ¾ ℋ ⅆ ∲ ≧̸</p> "###, r###"Entity and numeric character references (24)"### - ); +); assert_eq!( - micromark_with_options( - r###"# Ӓ Ϡ � -"###, - DANGER - ), + micromark_with_options(r###"# Ӓ Ϡ � +"###, DANGER), r###"<p># Ӓ Ϡ �</p> "###, r###"Entity and numeric character references (25)"### - ); +); assert_eq!( - micromark_with_options( - r###"" ആ ಫ -"###, - DANGER - ), + micromark_with_options(r###"" ആ ಫ +"###, DANGER), r###"<p>" ആ ಫ</p> "###, r###"Entity and numeric character references (26)"### - ); +); assert_eq!( - micromark_with_options( - r###"  &x; &#; &#x; + micromark_with_options(r###"  &x; &#; &#x; � &#abcdef0; &ThisIsNotDefined; &hi?; -"###, - DANGER - ), +"###, DANGER), r###"<p>&nbsp &x; &#; &#x; &#87654321; &#abcdef0; &ThisIsNotDefined; &hi?;</p> "###, r###"Entity and numeric character references (27)"### - ); +); assert_eq!( - micromark_with_options( - r###"© -"###, - DANGER - ), + micromark_with_options(r###"© +"###, DANGER), r###"<p>&copy</p> "###, r###"Entity and numeric character references (28)"### - ); +); assert_eq!( - micromark_with_options( - r###"&MadeUpEntity; -"###, - DANGER - ), + micromark_with_options(r###"&MadeUpEntity; +"###, DANGER), r###"<p>&MadeUpEntity;</p> "###, r###"Entity and numeric character references (29)"### - ); +); assert_eq!( - micromark_with_options( - r###"<a href="öö.html"> -"###, - DANGER - ), + micromark_with_options(r###"<a href="öö.html"> +"###, DANGER), r###"<a href="öö.html"> "###, r###"Entity and numeric character references (30)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo](/föö "föö") -"###, - DANGER - ), + micromark_with_options(r###"[foo](/föö "föö") +"###, DANGER), r###"<p><a href="/f%C3%B6%C3%B6" title="föö">foo</a></p> "###, r###"Entity and numeric character references (31)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo] + micromark_with_options(r###"[foo] [foo]: /föö "föö" -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/f%C3%B6%C3%B6" title="föö">foo</a></p> "###, r###"Entity and numeric character references (32)"### - ); +); assert_eq!( - micromark_with_options( - r###"``` föö + micromark_with_options(r###"``` föö foo ``` -"###, - DANGER - ), +"###, DANGER), r###"<pre><code class="language-föö">foo </code></pre> "###, r###"Entity and numeric character references (33)"### - ); +); assert_eq!( - micromark_with_options( - r###"`föö` -"###, - DANGER - ), + micromark_with_options(r###"`föö` +"###, DANGER), r###"<p><code>f&ouml;&ouml;</code></p> "###, r###"Entity and numeric character references (34)"### - ); +); assert_eq!( - micromark_with_options( - r###" föfö -"###, - DANGER - ), + micromark_with_options(r###" föfö +"###, DANGER), r###"<pre><code>f&ouml;f&ouml; </code></pre> "###, r###"Entity and numeric character references (35)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo* + micromark_with_options(r###"*foo* *foo* -"###, - DANGER - ), +"###, DANGER), r###"<p>*foo* <em>foo</em></p> "###, r###"Entity and numeric character references (36)"### - ); +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options(r###"* foo + assert_eq!( + micromark_with_options(r###"* foo - // * foo - // "###, DANGER), - // r###"<p>* foo</p> - // <ul> - // <li>foo</li> - // </ul> - // "###, - // r###"Entity and numeric character references (37)"### - // ); +* foo +"###, DANGER), + r###"<p>* foo</p> +<ul> +<li>foo</li> +</ul> +"###, + r###"Entity and numeric character references (37)"### +); assert_eq!( - micromark_with_options( - r###"foo bar -"###, - DANGER - ), + micromark_with_options(r###"foo bar +"###, DANGER), r###"<p>foo bar</p> "###, r###"Entity and numeric character references (38)"### - ); +); assert_eq!( - micromark_with_options( - r###"	foo -"###, - DANGER - ), + micromark_with_options(r###"	foo +"###, DANGER), r###"<p> foo</p> "###, r###"Entity and numeric character references (39)"### - ); +); assert_eq!( - micromark_with_options( - r###"[a](url "tit") -"###, - DANGER - ), + micromark_with_options(r###"[a](url "tit") +"###, DANGER), r###"<p>[a](url "tit")</p> "###, r###"Entity and numeric character references (40)"### - ); +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options(r###"- `one - // - two` - // "###, DANGER), - // r###"<ul> - // <li>`one</li> - // <li>two`</li> - // </ul> - // "###, - // r###"Precedence (41)"### - // ); + assert_eq!( + micromark_with_options(r###"- `one +- two` +"###, DANGER), + r###"<ul> +<li>`one</li> +<li>two`</li> +</ul> +"###, + r###"Precedence (41)"### +); assert_eq!( - micromark_with_options( - r###"*** + micromark_with_options(r###"*** --- ___ -"###, - DANGER - ), +"###, DANGER), r###"<hr /> <hr /> <hr /> "###, r###"Thematic breaks (42)"### - ); +); assert_eq!( - micromark_with_options( - r###"+++ -"###, - DANGER - ), + micromark_with_options(r###"+++ +"###, DANGER), r###"<p>+++</p> "###, r###"Thematic breaks (43)"### - ); +); assert_eq!( - micromark_with_options( - r###"=== -"###, - DANGER - ), + micromark_with_options(r###"=== +"###, DANGER), r###"<p>===</p> "###, r###"Thematic breaks (44)"### - ); +); assert_eq!( - micromark_with_options( - r###"-- + micromark_with_options(r###"-- ** __ -"###, - DANGER - ), +"###, DANGER), r###"<p>-- ** __</p> "###, r###"Thematic breaks (45)"### - ); +); assert_eq!( - micromark_with_options( - r###" *** + micromark_with_options(r###" *** *** *** -"###, - DANGER - ), +"###, DANGER), r###"<hr /> <hr /> <hr /> "###, r###"Thematic breaks (46)"### - ); +); assert_eq!( - micromark_with_options( - r###" *** -"###, - DANGER - ), + micromark_with_options(r###" *** +"###, DANGER), r###"<pre><code>*** </code></pre> "###, r###"Thematic breaks (47)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo + micromark_with_options(r###"Foo *** -"###, - DANGER - ), +"###, DANGER), r###"<p>Foo ***</p> "###, r###"Thematic breaks (48)"### - ); +); assert_eq!( - micromark_with_options( - r###"_____________________________________ -"###, - DANGER - ), + micromark_with_options(r###"_____________________________________ +"###, DANGER), r###"<hr /> "###, r###"Thematic breaks (49)"### - ); +); assert_eq!( - micromark_with_options( - r###" - - - -"###, - DANGER - ), + micromark_with_options(r###" - - - +"###, DANGER), r###"<hr /> "###, r###"Thematic breaks (50)"### - ); +); assert_eq!( - micromark_with_options( - r###" ** * ** * ** * ** -"###, - DANGER - ), + micromark_with_options(r###" ** * ** * ** * ** +"###, DANGER), r###"<hr /> "###, r###"Thematic breaks (51)"### - ); +); assert_eq!( - micromark_with_options( - r###"- - - - -"###, - DANGER - ), + micromark_with_options(r###"- - - - +"###, DANGER), r###"<hr /> "###, r###"Thematic breaks (52)"### - ); +); assert_eq!( - micromark_with_options( - r###"- - - - -"###, - DANGER - ), + micromark_with_options(r###"- - - - +"###, DANGER), r###"<hr /> "###, r###"Thematic breaks (53)"### - ); +); assert_eq!( - micromark_with_options( - r###"_ _ _ _ a + micromark_with_options(r###"_ _ _ _ a a------ ---a--- -"###, - DANGER - ), +"###, DANGER), r###"<p>_ _ _ _ a</p> <p>a------</p> <p>---a---</p> "###, r###"Thematic breaks (54)"### - ); +); assert_eq!( - micromark_with_options( - r###" *-* -"###, - DANGER - ), + micromark_with_options(r###" *-* +"###, DANGER), r###"<p><em>-</em></p> "###, r###"Thematic breaks (55)"### - ); +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options(r###"- foo - // *** - // - bar - // "###, DANGER), - // r###"<ul> - // <li>foo</li> - // </ul> - // <hr /> - // <ul> - // <li>bar</li> - // </ul> - // "###, - // r###"Thematic breaks (56)"### - // ); + assert_eq!( + micromark_with_options(r###"- foo +*** +- bar +"###, DANGER), + r###"<ul> +<li>foo</li> +</ul> +<hr /> +<ul> +<li>bar</li> +</ul> +"###, + r###"Thematic breaks (56)"### +); assert_eq!( - micromark_with_options( - r###"Foo + micromark_with_options(r###"Foo *** bar -"###, - DANGER - ), +"###, DANGER), r###"<p>Foo</p> <hr /> <p>bar</p> "###, r###"Thematic breaks (57)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo + micromark_with_options(r###"Foo --- bar -"###, - DANGER - ), +"###, DANGER), r###"<h2>Foo</h2> <p>bar</p> "###, r###"Thematic breaks (58)"### - ); +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options(r###"* Foo - // * * * - // * Bar - // "###, DANGER), - // r###"<ul> - // <li>Foo</li> - // </ul> - // <hr /> - // <ul> - // <li>Bar</li> - // </ul> - // "###, - // r###"Thematic breaks (59)"### - // ); + assert_eq!( + micromark_with_options(r###"* Foo +* * * +* Bar +"###, DANGER), + r###"<ul> +<li>Foo</li> +</ul> +<hr /> +<ul> +<li>Bar</li> +</ul> +"###, + r###"Thematic breaks (59)"### +); assert_eq!( - micromark_with_options( - r###"- Foo + micromark_with_options(r###"- Foo - * * * -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li>Foo</li> <li> @@ -822,19 +650,16 @@ bar </ul> "###, r###"Thematic breaks (60)"### - ); +); assert_eq!( - micromark_with_options( - r###"# foo + micromark_with_options(r###"# foo ## foo ### foo #### foo ##### foo ###### foo -"###, - DANGER - ), +"###, DANGER), r###"<h1>foo</h1> <h2>foo</h2> <h3>foo</h3> @@ -843,288 +668,224 @@ bar <h6>foo</h6> "###, r###"ATX headings (61)"### - ); +); assert_eq!( - micromark_with_options( - r###"####### foo -"###, - DANGER - ), + micromark_with_options(r###"####### foo +"###, DANGER), r###"<p>####### foo</p> "###, r###"ATX headings (62)"### - ); +); assert_eq!( - micromark_with_options( - r###"#5 bolt + micromark_with_options(r###"#5 bolt #hashtag -"###, - DANGER - ), +"###, DANGER), r###"<p>#5 bolt</p> <p>#hashtag</p> "###, r###"ATX headings (63)"### - ); +); assert_eq!( - micromark_with_options( - r###"\## foo -"###, - DANGER - ), + micromark_with_options(r###"\## foo +"###, DANGER), r###"<p>## foo</p> "###, r###"ATX headings (64)"### - ); +); assert_eq!( - micromark_with_options( - r###"# foo *bar* \*baz\* -"###, - DANGER - ), + micromark_with_options(r###"# foo *bar* \*baz\* +"###, DANGER), r###"<h1>foo <em>bar</em> *baz*</h1> "###, r###"ATX headings (65)"### - ); +); assert_eq!( - micromark_with_options( - r###"# foo -"###, - DANGER - ), + micromark_with_options(r###"# foo +"###, DANGER), r###"<h1>foo</h1> "###, r###"ATX headings (66)"### - ); +); assert_eq!( - micromark_with_options( - r###" ### foo + micromark_with_options(r###" ### foo ## foo # foo -"###, - DANGER - ), +"###, DANGER), r###"<h3>foo</h3> <h2>foo</h2> <h1>foo</h1> "###, r###"ATX headings (67)"### - ); +); assert_eq!( - micromark_with_options( - r###" # foo -"###, - DANGER - ), + micromark_with_options(r###" # foo +"###, DANGER), r###"<pre><code># foo </code></pre> "###, r###"ATX headings (68)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo + micromark_with_options(r###"foo # bar -"###, - DANGER - ), +"###, DANGER), r###"<p>foo # bar</p> "###, r###"ATX headings (69)"### - ); +); assert_eq!( - micromark_with_options( - r###"## foo ## + micromark_with_options(r###"## foo ## ### bar ### -"###, - DANGER - ), +"###, DANGER), r###"<h2>foo</h2> <h3>bar</h3> "###, r###"ATX headings (70)"### - ); +); assert_eq!( - micromark_with_options( - r###"# foo ################################## + micromark_with_options(r###"# foo ################################## ##### foo ## -"###, - DANGER - ), +"###, DANGER), r###"<h1>foo</h1> <h5>foo</h5> "###, r###"ATX headings (71)"### - ); +); assert_eq!( - micromark_with_options( - r###"### foo ### -"###, - DANGER - ), + micromark_with_options(r###"### foo ### +"###, DANGER), r###"<h3>foo</h3> "###, r###"ATX headings (72)"### - ); +); assert_eq!( - micromark_with_options( - r###"### foo ### b -"###, - DANGER - ), + micromark_with_options(r###"### foo ### b +"###, DANGER), r###"<h3>foo ### b</h3> "###, r###"ATX headings (73)"### - ); +); assert_eq!( - micromark_with_options( - r###"# foo# -"###, - DANGER - ), + micromark_with_options(r###"# foo# +"###, DANGER), r###"<h1>foo#</h1> "###, r###"ATX headings (74)"### - ); +); assert_eq!( - micromark_with_options( - r###"### foo \### + micromark_with_options(r###"### foo \### ## foo #\## # foo \# -"###, - DANGER - ), +"###, DANGER), r###"<h3>foo ###</h3> <h2>foo ###</h2> <h1>foo #</h1> "###, r###"ATX headings (75)"### - ); +); assert_eq!( - micromark_with_options( - r###"**** + micromark_with_options(r###"**** ## foo **** -"###, - DANGER - ), +"###, DANGER), r###"<hr /> <h2>foo</h2> <hr /> "###, r###"ATX headings (76)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo bar + micromark_with_options(r###"Foo bar # baz Bar foo -"###, - DANGER - ), +"###, DANGER), r###"<p>Foo bar</p> <h1>baz</h1> <p>Bar foo</p> "###, r###"ATX headings (77)"### - ); +); assert_eq!( - micromark_with_options( - r###"## + micromark_with_options(r###"## # ### ### -"###, - DANGER - ), +"###, DANGER), r###"<h2></h2> <h1></h1> <h3></h3> "###, r###"ATX headings (78)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo *bar* + micromark_with_options(r###"Foo *bar* ========= Foo *bar* --------- -"###, - DANGER - ), +"###, DANGER), r###"<h1>Foo <em>bar</em></h1> <h2>Foo <em>bar</em></h2> "###, r###"Setext headings (79)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo *bar + micromark_with_options(r###"Foo *bar baz* ==== -"###, - DANGER - ), +"###, DANGER), r###"<h1>Foo <em>bar baz</em></h1> "###, r###"Setext headings (80)"### - ); +); assert_eq!( - micromark_with_options( - r###" Foo *bar -baz* + micromark_with_options(r###" Foo *bar +baz* ==== -"###, - DANGER - ), +"###, DANGER), r###"<h1>Foo <em>bar baz</em></h1> "###, r###"Setext headings (81)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo + micromark_with_options(r###"Foo ------------------------- Foo = -"###, - DANGER - ), +"###, DANGER), r###"<h2>Foo</h2> <h1>Foo</h1> "###, r###"Setext headings (82)"### - ); +); assert_eq!( - micromark_with_options( - r###" Foo + micromark_with_options(r###" Foo --- Foo @@ -1132,26 +893,21 @@ Foo Foo === -"###, - DANGER - ), +"###, DANGER), r###"<h2>Foo</h2> <h2>Foo</h2> <h1>Foo</h1> "###, r###"Setext headings (83)"### - ); +); assert_eq!( - micromark_with_options( - r###" Foo + micromark_with_options(r###" Foo --- Foo --- -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>Foo --- @@ -1160,346 +916,280 @@ Foo <hr /> "###, r###"Setext headings (84)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo - ---- -"###, - DANGER - ), + micromark_with_options(r###"Foo + ---- +"###, DANGER), r###"<h2>Foo</h2> "###, r###"Setext headings (85)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo + micromark_with_options(r###"Foo --- -"###, - DANGER - ), +"###, DANGER), r###"<p>Foo ---</p> "###, r###"Setext headings (86)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo + micromark_with_options(r###"Foo = = Foo --- - -"###, - DANGER - ), +"###, DANGER), r###"<p>Foo = =</p> <p>Foo</p> <hr /> "###, r###"Setext headings (87)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo + micromark_with_options(r###"Foo ----- -"###, - DANGER - ), +"###, DANGER), r###"<h2>Foo</h2> "###, r###"Setext headings (88)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo\ + micromark_with_options(r###"Foo\ ---- -"###, - DANGER - ), +"###, DANGER), r###"<h2>Foo\</h2> "###, r###"Setext headings (89)"### - ); +); assert_eq!( - micromark_with_options( - r###"`Foo + micromark_with_options(r###"`Foo ---- ` <a title="a lot --- of dashes"/> -"###, - DANGER - ), +"###, DANGER), r###"<h2>`Foo</h2> <p>`</p> <h2><a title="a lot</h2> <p>of dashes"/></p> "###, r###"Setext headings (90)"### - ); +); assert_eq!( - micromark_with_options( - r###"> Foo + micromark_with_options(r###"> Foo --- -"###, - DANGER - ), +"###, DANGER), r###"<blockquote> <p>Foo</p> </blockquote> <hr /> "###, r###"Setext headings (91)"### - ); - - // To do: setext heading interrupt? - // assert_eq!( - // micromark_with_options(r###"> foo - // bar - // === - // "###, DANGER), - // r###"<blockquote> - // <p>foo - // bar - // ===</p> - // </blockquote> - // "###, - // r###"Setext headings (92)"### - // ); - - assert_eq!( - micromark_with_options( - r###"- Foo +); + +// To do: some interruption bug. +// assert_eq!( +// micromark_with_options(r###"> foo +// bar +// === +// "###, DANGER), +// r###"<blockquote> +// <p>foo +// bar +// ===</p> +// </blockquote> +// "###, +// r###"Setext headings (92)"### +// ); + + assert_eq!( + micromark_with_options(r###"- Foo --- -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li>Foo</li> </ul> <hr /> "###, r###"Setext headings (93)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo + micromark_with_options(r###"Foo Bar --- -"###, - DANGER - ), +"###, DANGER), r###"<h2>Foo Bar</h2> "###, r###"Setext headings (94)"### - ); +); assert_eq!( - micromark_with_options( - r###"--- + micromark_with_options(r###"--- Foo --- Bar --- Baz -"###, - DANGER - ), +"###, DANGER), r###"<hr /> <h2>Foo</h2> <h2>Bar</h2> <p>Baz</p> "###, r###"Setext headings (95)"### - ); +); assert_eq!( - micromark_with_options( - r###" + micromark_with_options(r###" ==== -"###, - DANGER - ), +"###, DANGER), r###"<p>====</p> "###, r###"Setext headings (96)"### - ); +); assert_eq!( - micromark_with_options( - r###"--- + micromark_with_options(r###"--- --- -"###, - DANGER - ), +"###, DANGER), r###"<hr /> <hr /> "###, r###"Setext headings (97)"### - ); +); assert_eq!( - micromark_with_options( - r###"- foo + micromark_with_options(r###"- foo ----- -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li>foo</li> </ul> <hr /> "###, r###"Setext headings (98)"### - ); +); assert_eq!( - micromark_with_options( - r###" foo + micromark_with_options(r###" foo --- -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>foo </code></pre> <hr /> "###, r###"Setext headings (99)"### - ); +); assert_eq!( - micromark_with_options( - r###"> foo + micromark_with_options(r###"> foo ----- -"###, - DANGER - ), +"###, DANGER), r###"<blockquote> <p>foo</p> </blockquote> <hr /> "###, r###"Setext headings (100)"### - ); +); assert_eq!( - micromark_with_options( - r###"\> foo + micromark_with_options(r###"\> foo ------ -"###, - DANGER - ), +"###, DANGER), r###"<h2>> foo</h2> "###, r###"Setext headings (101)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo + micromark_with_options(r###"Foo bar --- baz -"###, - DANGER - ), +"###, DANGER), r###"<p>Foo</p> <h2>bar</h2> <p>baz</p> "###, r###"Setext headings (102)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo + micromark_with_options(r###"Foo bar --- baz -"###, - DANGER - ), +"###, DANGER), r###"<p>Foo bar</p> <hr /> <p>baz</p> "###, r###"Setext headings (103)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo + micromark_with_options(r###"Foo bar * * * baz -"###, - DANGER - ), +"###, DANGER), r###"<p>Foo bar</p> <hr /> <p>baz</p> "###, r###"Setext headings (104)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo + micromark_with_options(r###"Foo bar \--- baz -"###, - DANGER - ), +"###, DANGER), r###"<p>Foo bar --- baz</p> "###, r###"Setext headings (105)"### - ); +); assert_eq!( - micromark_with_options( - r###" a simple + micromark_with_options(r###" a simple indented code block -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>a simple indented code block </code></pre> "###, r###"Indented code blocks (106)"### - ); +); assert_eq!( - micromark_with_options( - r###" - foo + micromark_with_options(r###" - foo bar -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li> <p>foo</p> @@ -1508,35 +1198,31 @@ baz</p> </ul> "###, r###"Indented code blocks (107)"### - ); +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options(r###"1. foo + assert_eq!( + micromark_with_options(r###"1. foo - // - bar - // "###, DANGER), - // r###"<ol> - // <li> - // <p>foo</p> - // <ul> - // <li>bar</li> - // </ul> - // </li> - // </ol> - // "###, - // r###"Indented code blocks (108)"### - // ); + - bar +"###, DANGER), + r###"<ol> +<li> +<p>foo</p> +<ul> +<li>bar</li> +</ul> +</li> +</ol> +"###, + r###"Indented code blocks (108)"### +); assert_eq!( - micromark_with_options( - r###" <a/> + micromark_with_options(r###" <a/> *hi* - one -"###, - DANGER - ), +"###, DANGER), r###"<pre><code><a/> *hi* @@ -1544,20 +1230,17 @@ baz</p> </code></pre> "###, r###"Indented code blocks (109)"### - ); +); assert_eq!( - micromark_with_options( - r###" chunk1 + micromark_with_options(r###" chunk1 chunk2 - - - + + + chunk3 -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>chunk1 chunk2 @@ -1568,63 +1251,51 @@ chunk3 </code></pre> "###, r###"Indented code blocks (110)"### - ); +); assert_eq!( - micromark_with_options( - r###" chunk1 - + micromark_with_options(r###" chunk1 + chunk2 -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>chunk1 - + chunk2 </code></pre> "###, r###"Indented code blocks (111)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo + micromark_with_options(r###"Foo bar -"###, - DANGER - ), +"###, DANGER), r###"<p>Foo bar</p> "###, r###"Indented code blocks (112)"### - ); +); assert_eq!( - micromark_with_options( - r###" foo + micromark_with_options(r###" foo bar -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>foo </code></pre> <p>bar</p> "###, r###"Indented code blocks (113)"### - ); +); assert_eq!( - micromark_with_options( - r###"# Heading + micromark_with_options(r###"# Heading foo Heading ------ foo ---- -"###, - DANGER - ), +"###, DANGER), r###"<h1>Heading</h1> <pre><code>foo </code></pre> @@ -1634,196 +1305,157 @@ Heading <hr /> "###, r###"Indented code blocks (114)"### - ); +); assert_eq!( - micromark_with_options( - r###" foo + micromark_with_options(r###" foo bar -"###, - DANGER - ), +"###, DANGER), r###"<pre><code> foo bar </code></pre> "###, r###"Indented code blocks (115)"### - ); +); assert_eq!( - micromark_with_options( - r###" - + micromark_with_options(r###" + foo + - -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>foo </code></pre> "###, r###"Indented code blocks (116)"### - ); +); assert_eq!( - micromark_with_options( - r###" foo -"###, - DANGER - ), - r###"<pre><code>foo + micromark_with_options(r###" foo +"###, DANGER), + r###"<pre><code>foo </code></pre> "###, r###"Indented code blocks (117)"### - ); +); assert_eq!( - micromark_with_options( - r###"``` + micromark_with_options(r###"``` < > ``` -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>< > </code></pre> "###, r###"Fenced code blocks (118)"### - ); +); assert_eq!( - micromark_with_options( - r###"~~~ + micromark_with_options(r###"~~~ < > ~~~ -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>< > </code></pre> "###, r###"Fenced code blocks (119)"### - ); +); assert_eq!( - micromark_with_options( - r###"`` + micromark_with_options(r###"`` foo `` -"###, - DANGER - ), +"###, DANGER), r###"<p><code>foo</code></p> "###, r###"Fenced code blocks (120)"### - ); +); assert_eq!( - micromark_with_options( - r###"``` + micromark_with_options(r###"``` aaa ~~~ ``` -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>aaa ~~~ </code></pre> "###, r###"Fenced code blocks (121)"### - ); +); assert_eq!( - micromark_with_options( - r###"~~~ + micromark_with_options(r###"~~~ aaa ``` ~~~ -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>aaa ``` </code></pre> "###, r###"Fenced code blocks (122)"### - ); +); assert_eq!( - micromark_with_options( - r###"```` + micromark_with_options(r###"```` aaa ``` `````` -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>aaa ``` </code></pre> "###, r###"Fenced code blocks (123)"### - ); +); assert_eq!( - micromark_with_options( - r###"~~~~ + micromark_with_options(r###"~~~~ aaa ~~~ ~~~~ -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>aaa ~~~ </code></pre> "###, r###"Fenced code blocks (124)"### - ); +); assert_eq!( - micromark_with_options( - r###"``` -"###, - DANGER - ), + micromark_with_options(r###"``` +"###, DANGER), r###"<pre><code></code></pre> "###, r###"Fenced code blocks (125)"### - ); +); assert_eq!( - micromark_with_options( - r###"````` + micromark_with_options(r###"````` ``` aaa -"###, - DANGER - ), +"###, DANGER), r###"<pre><code> ``` aaa </code></pre> "###, r###"Fenced code blocks (126)"### - ); +); assert_eq!( - micromark_with_options( - r###"> ``` + micromark_with_options(r###"> ``` > aaa bbb -"###, - DANGER - ), +"###, DANGER), r###"<blockquote> <pre><code>aaa </code></pre> @@ -1831,313 +1463,253 @@ bbb <p>bbb</p> "###, r###"Fenced code blocks (127)"### - ); +); assert_eq!( - micromark_with_options( - r###"``` - + micromark_with_options(r###"``` + ``` -"###, - DANGER - ), +"###, DANGER), r###"<pre><code> - + </code></pre> "###, r###"Fenced code blocks (128)"### - ); +); assert_eq!( - micromark_with_options( - r###"``` + micromark_with_options(r###"``` ``` -"###, - DANGER - ), +"###, DANGER), r###"<pre><code></code></pre> "###, r###"Fenced code blocks (129)"### - ); +); assert_eq!( - micromark_with_options( - r###" ``` + micromark_with_options(r###" ``` aaa aaa ``` -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>aaa aaa </code></pre> "###, r###"Fenced code blocks (130)"### - ); +); assert_eq!( - micromark_with_options( - r###" ``` + micromark_with_options(r###" ``` aaa aaa aaa ``` -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>aaa aaa aaa </code></pre> "###, r###"Fenced code blocks (131)"### - ); +); assert_eq!( - micromark_with_options( - r###" ``` + micromark_with_options(r###" ``` aaa aaa aaa ``` -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>aaa aaa aaa </code></pre> "###, r###"Fenced code blocks (132)"### - ); +); assert_eq!( - micromark_with_options( - r###" ``` + micromark_with_options(r###" ``` aaa ``` -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>``` aaa ``` </code></pre> "###, r###"Fenced code blocks (133)"### - ); +); assert_eq!( - micromark_with_options( - r###"``` + micromark_with_options(r###"``` aaa ``` -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>aaa </code></pre> "###, r###"Fenced code blocks (134)"### - ); +); assert_eq!( - micromark_with_options( - r###" ``` + micromark_with_options(r###" ``` aaa ``` -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>aaa </code></pre> "###, r###"Fenced code blocks (135)"### - ); +); assert_eq!( - micromark_with_options( - r###"``` + micromark_with_options(r###"``` aaa ``` -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>aaa ``` </code></pre> "###, r###"Fenced code blocks (136)"### - ); +); assert_eq!( - micromark_with_options( - r###"``` ``` + micromark_with_options(r###"``` ``` aaa -"###, - DANGER - ), +"###, DANGER), r###"<p><code> </code> aaa</p> "###, r###"Fenced code blocks (137)"### - ); +); assert_eq!( - micromark_with_options( - r###"~~~~~~ + micromark_with_options(r###"~~~~~~ aaa ~~~ ~~ -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>aaa ~~~ ~~ </code></pre> "###, r###"Fenced code blocks (138)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo + micromark_with_options(r###"foo ``` bar ``` baz -"###, - DANGER - ), +"###, DANGER), r###"<p>foo</p> <pre><code>bar </code></pre> <p>baz</p> "###, r###"Fenced code blocks (139)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo + micromark_with_options(r###"foo --- ~~~ bar ~~~ # baz -"###, - DANGER - ), +"###, DANGER), r###"<h2>foo</h2> <pre><code>bar </code></pre> <h1>baz</h1> "###, r###"Fenced code blocks (140)"### - ); +); assert_eq!( - micromark_with_options( - r###"```ruby + micromark_with_options(r###"```ruby def foo(x) return 3 end ``` -"###, - DANGER - ), +"###, DANGER), r###"<pre><code class="language-ruby">def foo(x) return 3 end </code></pre> "###, r###"Fenced code blocks (141)"### - ); +); assert_eq!( - micromark_with_options( - r###"~~~~ ruby startline=3 $%@#$ + micromark_with_options(r###"~~~~ ruby startline=3 $%@#$ def foo(x) return 3 end ~~~~~~~ -"###, - DANGER - ), +"###, DANGER), r###"<pre><code class="language-ruby">def foo(x) return 3 end </code></pre> "###, r###"Fenced code blocks (142)"### - ); +); assert_eq!( - micromark_with_options( - r###"````; + micromark_with_options(r###"````; ```` -"###, - DANGER - ), +"###, DANGER), r###"<pre><code class="language-;"></code></pre> "###, r###"Fenced code blocks (143)"### - ); +); assert_eq!( - micromark_with_options( - r###"``` aa ``` + micromark_with_options(r###"``` aa ``` foo -"###, - DANGER - ), +"###, DANGER), r###"<p><code>aa</code> foo</p> "###, r###"Fenced code blocks (144)"### - ); +); assert_eq!( - micromark_with_options( - r###"~~~ aa ``` ~~~ + micromark_with_options(r###"~~~ aa ``` ~~~ foo ~~~ -"###, - DANGER - ), +"###, DANGER), r###"<pre><code class="language-aa">foo </code></pre> "###, r###"Fenced code blocks (145)"### - ); +); assert_eq!( - micromark_with_options( - r###"``` + micromark_with_options(r###"``` ``` aaa ``` -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>``` aaa </code></pre> "###, r###"Fenced code blocks (146)"### - ); +); assert_eq!( - micromark_with_options( - r###"<table><tr><td> + micromark_with_options(r###"<table><tr><td> <pre> **Hello**, _world_. </pre> </td></tr></table> -"###, - DANGER - ), +"###, DANGER), r###"<table><tr><td> <pre> **Hello**, @@ -2146,11 +1718,10 @@ _world_. </td></tr></table> "###, r###"HTML blocks (147)"### - ); +); assert_eq!( - micromark_with_options( - r###"<table> + micromark_with_options(r###"<table> <tr> <td> hi @@ -2159,9 +1730,7 @@ _world_. </table> okay. -"###, - DANGER - ), +"###, DANGER), r###"<table> <tr> <td> @@ -2172,294 +1741,234 @@ okay. <p>okay.</p> "###, r###"HTML blocks (148)"### - ); +); assert_eq!( - micromark_with_options( - r###" <div> + micromark_with_options(r###" <div> *hello* <foo><a> -"###, - DANGER - ), +"###, DANGER), r###" <div> *hello* <foo><a> "###, r###"HTML blocks (149)"### - ); +); assert_eq!( - micromark_with_options( - r###"</div> + micromark_with_options(r###"</div> *foo* -"###, - DANGER - ), +"###, DANGER), r###"</div> *foo* "###, r###"HTML blocks (150)"### - ); +); assert_eq!( - micromark_with_options( - r###"<DIV CLASS="foo"> + micromark_with_options(r###"<DIV CLASS="foo"> *Markdown* </DIV> -"###, - DANGER - ), +"###, DANGER), r###"<DIV CLASS="foo"> <p><em>Markdown</em></p> </DIV> "###, r###"HTML blocks (151)"### - ); +); assert_eq!( - micromark_with_options( - r###"<div id="foo" + micromark_with_options(r###"<div id="foo" class="bar"> </div> -"###, - DANGER - ), +"###, DANGER), r###"<div id="foo" class="bar"> </div> "###, r###"HTML blocks (152)"### - ); +); assert_eq!( - micromark_with_options( - r###"<div id="foo" class="bar + micromark_with_options(r###"<div id="foo" class="bar baz"> </div> -"###, - DANGER - ), +"###, DANGER), r###"<div id="foo" class="bar baz"> </div> "###, r###"HTML blocks (153)"### - ); +); assert_eq!( - micromark_with_options( - r###"<div> + micromark_with_options(r###"<div> *foo* *bar* -"###, - DANGER - ), +"###, DANGER), r###"<div> *foo* <p><em>bar</em></p> "###, r###"HTML blocks (154)"### - ); +); assert_eq!( - micromark_with_options( - r###"<div id="foo" + micromark_with_options(r###"<div id="foo" *hi* -"###, - DANGER - ), +"###, DANGER), r###"<div id="foo" *hi* "###, r###"HTML blocks (155)"### - ); +); assert_eq!( - micromark_with_options( - r###"<div class + micromark_with_options(r###"<div class foo -"###, - DANGER - ), +"###, DANGER), r###"<div class foo "###, r###"HTML blocks (156)"### - ); +); assert_eq!( - micromark_with_options( - r###"<div *???-&&&-<--- + micromark_with_options(r###"<div *???-&&&-<--- *foo* -"###, - DANGER - ), +"###, DANGER), r###"<div *???-&&&-<--- *foo* "###, r###"HTML blocks (157)"### - ); +); assert_eq!( - micromark_with_options( - r###"<div><a href="bar">*foo*</a></div> -"###, - DANGER - ), + micromark_with_options(r###"<div><a href="bar">*foo*</a></div> +"###, DANGER), r###"<div><a href="bar">*foo*</a></div> "###, r###"HTML blocks (158)"### - ); +); assert_eq!( - micromark_with_options( - r###"<table><tr><td> + micromark_with_options(r###"<table><tr><td> foo </td></tr></table> -"###, - DANGER - ), +"###, DANGER), r###"<table><tr><td> foo </td></tr></table> "###, r###"HTML blocks (159)"### - ); +); assert_eq!( - micromark_with_options( - r###"<div></div> + micromark_with_options(r###"<div></div> ``` c int x = 33; ``` -"###, - DANGER - ), +"###, DANGER), r###"<div></div> ``` c int x = 33; ``` "###, r###"HTML blocks (160)"### - ); +); assert_eq!( - micromark_with_options( - r###"<a href="foo"> + micromark_with_options(r###"<a href="foo"> *bar* </a> -"###, - DANGER - ), +"###, DANGER), r###"<a href="foo"> *bar* </a> "###, r###"HTML blocks (161)"### - ); +); assert_eq!( - micromark_with_options( - r###"<Warning> + micromark_with_options(r###"<Warning> *bar* </Warning> -"###, - DANGER - ), +"###, DANGER), r###"<Warning> *bar* </Warning> "###, r###"HTML blocks (162)"### - ); +); assert_eq!( - micromark_with_options( - r###"<i class="foo"> + micromark_with_options(r###"<i class="foo"> *bar* </i> -"###, - DANGER - ), +"###, DANGER), r###"<i class="foo"> *bar* </i> "###, r###"HTML blocks (163)"### - ); +); assert_eq!( - micromark_with_options( - r###"</ins> + micromark_with_options(r###"</ins> *bar* -"###, - DANGER - ), +"###, DANGER), r###"</ins> *bar* "###, r###"HTML blocks (164)"### - ); +); assert_eq!( - micromark_with_options( - r###"<del> + micromark_with_options(r###"<del> *foo* </del> -"###, - DANGER - ), +"###, DANGER), r###"<del> *foo* </del> "###, r###"HTML blocks (165)"### - ); +); assert_eq!( - micromark_with_options( - r###"<del> + micromark_with_options(r###"<del> *foo* </del> -"###, - DANGER - ), +"###, DANGER), r###"<del> <p><em>foo</em></p> </del> "###, r###"HTML blocks (166)"### - ); +); assert_eq!( - micromark_with_options( - r###"<del>*foo*</del> -"###, - DANGER - ), + micromark_with_options(r###"<del>*foo*</del> +"###, DANGER), r###"<p><del><em>foo</em></del></p> "###, r###"HTML blocks (167)"### - ); +); assert_eq!( - micromark_with_options( - r###"<pre language="haskell"><code> + micromark_with_options(r###"<pre language="haskell"><code> import Text.HTML.TagSoup main :: IO () main = print $ parseTags tags </code></pre> okay -"###, - DANGER - ), +"###, DANGER), r###"<pre language="haskell"><code> import Text.HTML.TagSoup @@ -2469,19 +1978,16 @@ main = print $ parseTags tags <p>okay</p> "###, r###"HTML blocks (168)"### - ); +); assert_eq!( - micromark_with_options( - r###"<script type="text/javascript"> + micromark_with_options(r###"<script type="text/javascript"> // JavaScript example document.getElementById("demo").innerHTML = "Hello JavaScript!"; </script> okay -"###, - DANGER - ), +"###, DANGER), r###"<script type="text/javascript"> // JavaScript example @@ -2490,20 +1996,17 @@ document.getElementById("demo").innerHTML = "Hello JavaScript!"; <p>okay</p> "###, r###"HTML blocks (169)"### - ); +); assert_eq!( - micromark_with_options( - r###"<textarea> + micromark_with_options(r###"<textarea> *foo* _bar_ </textarea> -"###, - DANGER - ), +"###, DANGER), r###"<textarea> *foo* @@ -2513,20 +2016,17 @@ _bar_ </textarea> "###, r###"HTML blocks (170)"### - ); +); assert_eq!( - micromark_with_options( - r###"<style + micromark_with_options(r###"<style type="text/css"> h1 {color:red;} p {color:blue;} </style> okay -"###, - DANGER - ), +"###, DANGER), r###"<style type="text/css"> h1 {color:red;} @@ -2536,34 +2036,28 @@ p {color:blue;} <p>okay</p> "###, r###"HTML blocks (171)"### - ); +); assert_eq!( - micromark_with_options( - r###"<style + micromark_with_options(r###"<style type="text/css"> foo -"###, - DANGER - ), +"###, DANGER), r###"<style type="text/css"> foo "###, r###"HTML blocks (172)"### - ); +); assert_eq!( - micromark_with_options( - r###"> <div> + micromark_with_options(r###"> <div> > foo bar -"###, - DANGER - ), +"###, DANGER), r###"<blockquote> <div> foo @@ -2571,74 +2065,61 @@ foo <p>bar</p> "###, r###"HTML blocks (173)"### - ); +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options(r###"- <div> - // - foo - // "###, DANGER), - // r###"<ul> - // <li> - // <div> - // </li> - // <li>foo</li> - // </ul> - // "###, - // r###"HTML blocks (174)"### - // ); + assert_eq!( + micromark_with_options(r###"- <div> +- foo +"###, DANGER), + r###"<ul> +<li> +<div> +</li> +<li>foo</li> +</ul> +"###, + r###"HTML blocks (174)"### +); assert_eq!( - micromark_with_options( - r###"<style>p{color:red;}</style> + micromark_with_options(r###"<style>p{color:red;}</style> *foo* -"###, - DANGER - ), +"###, DANGER), r###"<style>p{color:red;}</style> <p><em>foo</em></p> "###, r###"HTML blocks (175)"### - ); +); assert_eq!( - micromark_with_options( - r###"<!-- foo -->*bar* + micromark_with_options(r###"<!-- foo -->*bar* *baz* -"###, - DANGER - ), +"###, DANGER), r###"<!-- foo -->*bar* <p><em>baz</em></p> "###, r###"HTML blocks (176)"### - ); +); assert_eq!( - micromark_with_options( - r###"<script> + micromark_with_options(r###"<script> foo </script>1. *bar* -"###, - DANGER - ), +"###, DANGER), r###"<script> foo </script>1. *bar* "###, r###"HTML blocks (177)"### - ); +); assert_eq!( - micromark_with_options( - r###"<!-- Foo + micromark_with_options(r###"<!-- Foo bar baz --> okay -"###, - DANGER - ), +"###, DANGER), r###"<!-- Foo bar @@ -2646,19 +2127,16 @@ bar <p>okay</p> "###, r###"HTML blocks (178)"### - ); +); assert_eq!( - micromark_with_options( - r###"<?php + micromark_with_options(r###"<?php echo '>'; ?> okay -"###, - DANGER - ), +"###, DANGER), r###"<?php echo '>'; @@ -2667,22 +2145,18 @@ okay <p>okay</p> "###, r###"HTML blocks (179)"### - ); +); assert_eq!( - micromark_with_options( - r###"<!DOCTYPE html> -"###, - DANGER - ), + micromark_with_options(r###"<!DOCTYPE html> +"###, DANGER), r###"<!DOCTYPE html> "###, r###"HTML blocks (180)"### - ); +); assert_eq!( - micromark_with_options( - r###"<![CDATA[ + micromark_with_options(r###"<![CDATA[ function matchwo(a,b) { if (a < b && a < 0) then { @@ -2695,9 +2169,7 @@ function matchwo(a,b) } ]]> okay -"###, - DANGER - ), +"###, DANGER), r###"<![CDATA[ function matchwo(a,b) { @@ -2713,122 +2185,100 @@ function matchwo(a,b) <p>okay</p> "###, r###"HTML blocks (181)"### - ); +); assert_eq!( - micromark_with_options( - r###" <!-- foo --> + micromark_with_options(r###" <!-- foo --> <!-- foo --> -"###, - DANGER - ), +"###, DANGER), r###" <!-- foo --> <pre><code><!-- foo --> </code></pre> "###, r###"HTML blocks (182)"### - ); +); assert_eq!( - micromark_with_options( - r###" <div> + micromark_with_options(r###" <div> <div> -"###, - DANGER - ), +"###, DANGER), r###" <div> <pre><code><div> </code></pre> "###, r###"HTML blocks (183)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo + micromark_with_options(r###"Foo <div> bar </div> -"###, - DANGER - ), +"###, DANGER), r###"<p>Foo</p> <div> bar </div> "###, r###"HTML blocks (184)"### - ); +); assert_eq!( - micromark_with_options( - r###"<div> + micromark_with_options(r###"<div> bar </div> *foo* -"###, - DANGER - ), +"###, DANGER), r###"<div> bar </div> *foo* "###, r###"HTML blocks (185)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo + micromark_with_options(r###"Foo <a href="bar"> baz -"###, - DANGER - ), +"###, DANGER), r###"<p>Foo <a href="bar"> baz</p> "###, r###"HTML blocks (186)"### - ); +); assert_eq!( - micromark_with_options( - r###"<div> + micromark_with_options(r###"<div> *Emphasized* text. </div> -"###, - DANGER - ), +"###, DANGER), r###"<div> <p><em>Emphasized</em> text.</p> </div> "###, r###"HTML blocks (187)"### - ); +); assert_eq!( - micromark_with_options( - r###"<div> + micromark_with_options(r###"<div> *Emphasized* text. </div> -"###, - DANGER - ), +"###, DANGER), r###"<div> *Emphasized* text. </div> "###, r###"HTML blocks (188)"### - ); +); assert_eq!( - micromark_with_options( - r###"<table> + micromark_with_options(r###"<table> <tr> @@ -2839,9 +2289,7 @@ Hi </tr> </table> -"###, - DANGER - ), +"###, DANGER), r###"<table> <tr> <td> @@ -2851,11 +2299,10 @@ Hi </table> "###, r###"HTML blocks (189)"### - ); +); assert_eq!( - micromark_with_options( - r###"<table> + micromark_with_options(r###"<table> <tr> @@ -2866,9 +2313,7 @@ Hi </tr> </table> -"###, - DANGER - ), +"###, DANGER), r###"<table> <tr> <pre><code><td> @@ -2879,76 +2324,61 @@ Hi </table> "###, r###"HTML blocks (190)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo]: /url "title" + micromark_with_options(r###"[foo]: /url "title" [foo] -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url" title="title">foo</a></p> "###, r###"Link reference definitions (191)"### - ); +); assert_eq!( - micromark_with_options( - r###" [foo]: - /url - 'the title' + micromark_with_options(r###" [foo]: + /url + 'the title' [foo] -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url" title="the title">foo</a></p> "###, r###"Link reference definitions (192)"### - ); +); assert_eq!( - micromark_with_options( - r###"[Foo*bar\]]:my_(url) 'title (with parens)' + micromark_with_options(r###"[Foo*bar\]]:my_(url) 'title (with parens)' [Foo*bar\]] -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="my_(url)" title="title (with parens)">Foo*bar]</a></p> "###, r###"Link reference definitions (193)"### - ); +); assert_eq!( - micromark_with_options( - r###"[Foo bar]: + micromark_with_options(r###"[Foo bar]: <my url> 'title' [Foo bar] -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="my%20url" title="title">Foo bar</a></p> "###, r###"Link reference definitions (194)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo]: /url ' + micromark_with_options(r###"[foo]: /url ' title line1 line2 ' [foo] -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url" title=" title line1 @@ -2956,289 +2386,228 @@ line2 ">foo</a></p> "###, r###"Link reference definitions (195)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo]: /url 'title + micromark_with_options(r###"[foo]: /url 'title with blank line' [foo] -"###, - DANGER - ), +"###, DANGER), r###"<p>[foo]: /url 'title</p> <p>with blank line'</p> <p>[foo]</p> "###, r###"Link reference definitions (196)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo]: + micromark_with_options(r###"[foo]: /url [foo] -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url">foo</a></p> "###, r###"Link reference definitions (197)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo]: + micromark_with_options(r###"[foo]: [foo] -"###, - DANGER - ), +"###, DANGER), r###"<p>[foo]:</p> <p>[foo]</p> "###, r###"Link reference definitions (198)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo]: <> + micromark_with_options(r###"[foo]: <> [foo] -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="">foo</a></p> "###, r###"Link reference definitions (199)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo]: <bar>(baz) + micromark_with_options(r###"[foo]: <bar>(baz) [foo] -"###, - DANGER - ), +"###, DANGER), r###"<p>[foo]: <bar>(baz)</p> <p>[foo]</p> "###, r###"Link reference definitions (200)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo]: /url\bar\*baz "foo\"bar\baz" + micromark_with_options(r###"[foo]: /url\bar\*baz "foo\"bar\baz" [foo] -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url%5Cbar*baz" title="foo"bar\baz">foo</a></p> "###, r###"Link reference definitions (201)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo] + micromark_with_options(r###"[foo] [foo]: url -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="url">foo</a></p> "###, r###"Link reference definitions (202)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo] + micromark_with_options(r###"[foo] [foo]: first [foo]: second -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="first">foo</a></p> "###, r###"Link reference definitions (203)"### - ); +); assert_eq!( - micromark_with_options( - r###"[FOO]: /url + micromark_with_options(r###"[FOO]: /url [Foo] -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url">Foo</a></p> "###, r###"Link reference definitions (204)"### - ); +); assert_eq!( - micromark_with_options( - r###"[ΑΓΩ]: /φου + micromark_with_options(r###"[ΑΓΩ]: /φου [αγω] -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/%CF%86%CE%BF%CF%85">αγω</a></p> "###, r###"Link reference definitions (205)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo]: /url -"###, - DANGER - ), + micromark_with_options(r###"[foo]: /url +"###, DANGER), r###""###, r###"Link reference definitions (206)"### - ); +); assert_eq!( - micromark_with_options( - r###"[ + micromark_with_options(r###"[ foo ]: /url bar -"###, - DANGER - ), +"###, DANGER), r###"<p>bar</p> "###, r###"Link reference definitions (207)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo]: /url "title" ok -"###, - DANGER - ), + micromark_with_options(r###"[foo]: /url "title" ok +"###, DANGER), r###"<p>[foo]: /url "title" ok</p> "###, r###"Link reference definitions (208)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo]: /url + micromark_with_options(r###"[foo]: /url "title" ok -"###, - DANGER - ), +"###, DANGER), r###"<p>"title" ok</p> "###, r###"Link reference definitions (209)"### - ); +); assert_eq!( - micromark_with_options( - r###" [foo]: /url "title" + micromark_with_options(r###" [foo]: /url "title" [foo] -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>[foo]: /url "title" </code></pre> <p>[foo]</p> "###, r###"Link reference definitions (210)"### - ); +); assert_eq!( - micromark_with_options( - r###"``` + micromark_with_options(r###"``` [foo]: /url ``` [foo] -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>[foo]: /url </code></pre> <p>[foo]</p> "###, r###"Link reference definitions (211)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo + micromark_with_options(r###"Foo [bar]: /baz [bar] -"###, - DANGER - ), +"###, DANGER), r###"<p>Foo [bar]: /baz</p> <p>[bar]</p> "###, r###"Link reference definitions (212)"### - ); +); assert_eq!( - micromark_with_options( - r###"# [Foo] + micromark_with_options(r###"# [Foo] [foo]: /url > bar -"###, - DANGER - ), +"###, DANGER), r###"<h1><a href="/url">Foo</a></h1> <blockquote> <p>bar</p> </blockquote> "###, r###"Link reference definitions (213)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo]: /url + micromark_with_options(r###"[foo]: /url bar === [foo] -"###, - DANGER - ), +"###, DANGER), r###"<h1>bar</h1> <p><a href="/url">foo</a></p> "###, r###"Link reference definitions (214)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo]: /url + micromark_with_options(r###"[foo]: /url === [foo] -"###, - DANGER - ), +"###, DANGER), r###"<p>=== <a href="/url">foo</a></p> "###, r###"Link reference definitions (215)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo]: /foo-url "foo" + micromark_with_options(r###"[foo]: /foo-url "foo" [bar]: /bar-url "bar" [baz]: /baz-url @@ -3246,169 +2615,139 @@ bar [foo], [bar], [baz] -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/foo-url" title="foo">foo</a>, <a href="/bar-url" title="bar">bar</a>, <a href="/baz-url">baz</a></p> "###, r###"Link reference definitions (216)"### - ); +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options(r###"[foo] + // To do: eol after definition in otherwise empty block quote. +// assert_eq!( +// micromark_with_options(r###"[foo] - // > [foo]: /url - // "###, DANGER), - // r###"<p><a href="/url">foo</a></p> - // <blockquote> - // </blockquote> - // "###, - // r###"Link reference definitions (217)"### - // ); +// > [foo]: /url +// "###, DANGER), +// r###"<p><a href="/url">foo</a></p> +// <blockquote> +// </blockquote> +// "###, +// r###"Link reference definitions (217)"### +// ); assert_eq!( - micromark_with_options( - r###"aaa + micromark_with_options(r###"aaa bbb -"###, - DANGER - ), +"###, DANGER), r###"<p>aaa</p> <p>bbb</p> "###, r###"Paragraphs (218)"### - ); +); assert_eq!( - micromark_with_options( - r###"aaa + micromark_with_options(r###"aaa bbb ccc ddd -"###, - DANGER - ), +"###, DANGER), r###"<p>aaa bbb</p> <p>ccc ddd</p> "###, r###"Paragraphs (219)"### - ); +); assert_eq!( - micromark_with_options( - r###"aaa + micromark_with_options(r###"aaa bbb -"###, - DANGER - ), +"###, DANGER), r###"<p>aaa</p> <p>bbb</p> "###, r###"Paragraphs (220)"### - ); +); assert_eq!( - micromark_with_options( - r###" aaa + micromark_with_options(r###" aaa bbb -"###, - DANGER - ), +"###, DANGER), r###"<p>aaa bbb</p> "###, r###"Paragraphs (221)"### - ); +); assert_eq!( - micromark_with_options( - r###"aaa + micromark_with_options(r###"aaa bbb ccc -"###, - DANGER - ), +"###, DANGER), r###"<p>aaa bbb ccc</p> "###, r###"Paragraphs (222)"### - ); +); assert_eq!( - micromark_with_options( - r###" aaa + micromark_with_options(r###" aaa bbb -"###, - DANGER - ), +"###, DANGER), r###"<p>aaa bbb</p> "###, r###"Paragraphs (223)"### - ); +); assert_eq!( - micromark_with_options( - r###" aaa + micromark_with_options(r###" aaa bbb -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>aaa </code></pre> <p>bbb</p> "###, r###"Paragraphs (224)"### - ); +); - // To do: whitespace trimming of editor likely? - // assert_eq!( - // micromark_with_options(r###"aaa - // bbb - // "###, DANGER), - // r###"<p>aaa<br /> - // bbb</p> - // "###, - // r###"Paragraphs (225)"### - // ); + assert_eq!( + micromark_with_options(r###"aaa +bbb +"###, DANGER), + r###"<p>aaa<br /> +bbb</p> +"###, + r###"Paragraphs (225)"### +); assert_eq!( - micromark_with_options( - r###" + micromark_with_options(r###" aaa - + # aaa - -"###, - DANGER - ), + +"###, DANGER), r###"<p>aaa</p> <h1>aaa</h1> "###, r###"Blank lines (226)"### - ); +); assert_eq!( - micromark_with_options( - r###"> # Foo + micromark_with_options(r###"> # Foo > bar > baz -"###, - DANGER - ), +"###, DANGER), r###"<blockquote> <h1>Foo</h1> <p>bar @@ -3416,16 +2755,13 @@ baz</p> </blockquote> "###, r###"Block quotes (227)"### - ); +); assert_eq!( - micromark_with_options( - r###"># Foo + micromark_with_options(r###"># Foo >bar > baz -"###, - DANGER - ), +"###, DANGER), r###"<blockquote> <h1>Foo</h1> <p>bar @@ -3433,16 +2769,13 @@ baz</p> </blockquote> "###, r###"Block quotes (228)"### - ); +); assert_eq!( - micromark_with_options( - r###" > # Foo + micromark_with_options(r###" > # Foo > bar > baz -"###, - DANGER - ), +"###, DANGER), r###"<blockquote> <h1>Foo</h1> <p>bar @@ -3450,25 +2783,22 @@ baz</p> </blockquote> "###, r###"Block quotes (229)"### - ); +); assert_eq!( - micromark_with_options( - r###" > # Foo + micromark_with_options(r###" > # Foo > bar > baz -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>> # Foo > bar > baz </code></pre> "###, r###"Block quotes (230)"### - ); +); - // To do: whitespace trimming of editor likely? + // To do: some lazy bug. // assert_eq!( // micromark_with_options(r###"> # Foo // > bar @@ -3484,13 +2814,10 @@ baz</p> // ); assert_eq!( - micromark_with_options( - r###"> bar + micromark_with_options(r###"> bar baz > foo -"###, - DANGER - ), +"###, DANGER), r###"<blockquote> <p>bar baz @@ -3498,47 +2825,40 @@ foo</p> </blockquote> "###, r###"Block quotes (232)"### - ); +); assert_eq!( - micromark_with_options( - r###"> foo + micromark_with_options(r###"> foo --- -"###, - DANGER - ), +"###, DANGER), r###"<blockquote> <p>foo</p> </blockquote> <hr /> "###, r###"Block quotes (233)"### - ); +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options(r###"> - foo - // - bar - // "###, DANGER), - // r###"<blockquote> - // <ul> - // <li>foo</li> - // </ul> - // </blockquote> - // <ul> - // <li>bar</li> - // </ul> - // "###, - // r###"Block quotes (234)"### - // ); + assert_eq!( + micromark_with_options(r###"> - foo +- bar +"###, DANGER), + r###"<blockquote> +<ul> +<li>foo</li> +</ul> +</blockquote> +<ul> +<li>bar</li> +</ul> +"###, + r###"Block quotes (234)"### +); assert_eq!( - micromark_with_options( - r###"> foo + micromark_with_options(r###"> foo bar -"###, - DANGER - ), +"###, DANGER), r###"<blockquote> <pre><code>foo </code></pre> @@ -3547,16 +2867,13 @@ foo</p> </code></pre> "###, r###"Block quotes (235)"### - ); +); assert_eq!( - micromark_with_options( - r###"> ``` + micromark_with_options(r###"> ``` foo ``` -"###, - DANGER - ), +"###, DANGER), r###"<blockquote> <pre><code></code></pre> </blockquote> @@ -3564,9 +2881,9 @@ foo <pre><code></code></pre> "###, r###"Block quotes (236)"### - ); +); - // To do: some bug with laziness. + // To do: some lazy bug. // assert_eq!( // micromark_with_options(r###"> foo // - bar @@ -3579,7 +2896,7 @@ foo // r###"Block quotes (237)"### // ); - // To do: eol after containers. + // To do: some eol in empty block quote bug. // assert_eq!( // micromark_with_options(r###"> // "###, DANGER), @@ -3589,11 +2906,11 @@ foo // r###"Block quotes (238)"### // ); - // To do: eol after containers. + // To do: some eol in empty block quote bug. // assert_eq!( // micromark_with_options(r###"> - // > - // > + // > + // > // "###, DANGER), // r###"<blockquote> // </blockquote> @@ -3601,11 +2918,11 @@ foo // r###"Block quotes (239)"### // ); - // To do: eol after containers. + // To do: some eol in empty block quote bug. // assert_eq!( // micromark_with_options(r###"> // > foo - // > + // > // "###, DANGER), // r###"<blockquote> // <p>foo</p> @@ -3615,13 +2932,10 @@ foo // ); assert_eq!( - micromark_with_options( - r###"> foo + micromark_with_options(r###"> foo > bar -"###, - DANGER - ), +"###, DANGER), r###"<blockquote> <p>foo</p> </blockquote> @@ -3630,62 +2944,50 @@ foo </blockquote> "###, r###"Block quotes (241)"### - ); +); assert_eq!( - micromark_with_options( - r###"> foo + micromark_with_options(r###"> foo > bar -"###, - DANGER - ), +"###, DANGER), r###"<blockquote> <p>foo bar</p> </blockquote> "###, r###"Block quotes (242)"### - ); +); assert_eq!( - micromark_with_options( - r###"> foo + micromark_with_options(r###"> foo > > bar -"###, - DANGER - ), +"###, DANGER), r###"<blockquote> <p>foo</p> <p>bar</p> </blockquote> "###, r###"Block quotes (243)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo + micromark_with_options(r###"foo > bar -"###, - DANGER - ), +"###, DANGER), r###"<p>foo</p> <blockquote> <p>bar</p> </blockquote> "###, r###"Block quotes (244)"### - ); +); assert_eq!( - micromark_with_options( - r###"> aaa + micromark_with_options(r###"> aaa *** > bbb -"###, - DANGER - ), +"###, DANGER), r###"<blockquote> <p>aaa</p> </blockquote> @@ -3695,9 +2997,9 @@ bar</p> </blockquote> "###, r###"Block quotes (245)"### - ); +); - // To do: some bug with laziness. + // To do: some eol in empty block quote bug. // assert_eq!( // micromark_with_options(r###"> bar // baz @@ -3711,38 +3013,32 @@ bar</p> // ); assert_eq!( - micromark_with_options( - r###"> bar + micromark_with_options(r###"> bar baz -"###, - DANGER - ), +"###, DANGER), r###"<blockquote> <p>bar</p> </blockquote> <p>baz</p> "###, r###"Block quotes (247)"### - ); +); assert_eq!( - micromark_with_options( - r###"> bar + micromark_with_options(r###"> bar > baz -"###, - DANGER - ), +"###, DANGER), r###"<blockquote> <p>bar</p> </blockquote> <p>baz</p> "###, r###"Block quotes (248)"### - ); +); - // To do: some bug with laziness. + // To do: some lazy bug. // assert_eq!( // micromark_with_options(r###"> > > foo // bar @@ -3759,7 +3055,7 @@ baz // r###"Block quotes (249)"### // ); - // To do: some bug with laziness. + // To do: some lazy bug. // assert_eq!( // micromark_with_options(r###">>> foo // > bar @@ -3779,13 +3075,10 @@ baz // ); assert_eq!( - micromark_with_options( - r###"> code + micromark_with_options(r###"> code > not code -"###, - DANGER - ), +"###, DANGER), r###"<blockquote> <pre><code>code </code></pre> @@ -3795,19 +3088,16 @@ baz </blockquote> "###, r###"Block quotes (251)"### - ); +); assert_eq!( - micromark_with_options( - r###"A paragraph + micromark_with_options(r###"A paragraph with two lines. indented code > A block quote. -"###, - DANGER - ), +"###, DANGER), r###"<p>A paragraph with two lines.</p> <pre><code>indented code @@ -3817,19 +3107,16 @@ with two lines.</p> </blockquote> "###, r###"List items (252)"### - ); +); assert_eq!( - micromark_with_options( - r###"1. A paragraph + micromark_with_options(r###"1. A paragraph with two lines. indented code > A block quote. -"###, - DANGER - ), +"###, DANGER), r###"<ol> <li> <p>A paragraph @@ -3843,32 +3130,26 @@ with two lines.</p> </ol> "###, r###"List items (253)"### - ); +); assert_eq!( - micromark_with_options( - r###"- one + micromark_with_options(r###"- one two -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li>one</li> </ul> <p>two</p> "###, r###"List items (254)"### - ); +); assert_eq!( - micromark_with_options( - r###"- one + micromark_with_options(r###"- one two -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li> <p>one</p> @@ -3877,16 +3158,13 @@ with two lines.</p> </ul> "###, r###"List items (255)"### - ); +); assert_eq!( - micromark_with_options( - r###" - one + micromark_with_options(r###" - one two -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li>one</li> </ul> @@ -3894,16 +3172,13 @@ with two lines.</p> </code></pre> "###, r###"List items (256)"### - ); +); assert_eq!( - micromark_with_options( - r###" - one + micromark_with_options(r###" - one two -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li> <p>one</p> @@ -3912,16 +3187,13 @@ with two lines.</p> </ul> "###, r###"List items (257)"### - ); +); assert_eq!( - micromark_with_options( - r###" > > 1. one + micromark_with_options(r###" > > 1. one >> >> two -"###, - DANGER - ), +"###, DANGER), r###"<blockquote> <blockquote> <ol> @@ -3934,16 +3206,13 @@ with two lines.</p> </blockquote> "###, r###"List items (258)"### - ); +); assert_eq!( - micromark_with_options( - r###">>- one + micromark_with_options(r###">>- one >> > > two -"###, - DANGER - ), +"###, DANGER), r###"<blockquote> <blockquote> <ul> @@ -3954,31 +3223,25 @@ with two lines.</p> </blockquote> "###, r###"List items (259)"### - ); +); assert_eq!( - micromark_with_options( - r###"-one + micromark_with_options(r###"-one 2.two -"###, - DANGER - ), +"###, DANGER), r###"<p>-one</p> <p>2.two</p> "###, r###"List items (260)"### - ); +); assert_eq!( - micromark_with_options( - r###"- foo + micromark_with_options(r###"- foo bar -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li> <p>foo</p> @@ -3987,11 +3250,10 @@ with two lines.</p> </ul> "###, r###"List items (261)"### - ); +); assert_eq!( - micromark_with_options( - r###"1. foo + micromark_with_options(r###"1. foo ``` bar @@ -4000,9 +3262,7 @@ with two lines.</p> baz > bam -"###, - DANGER - ), +"###, DANGER), r###"<ol> <li> <p>foo</p> @@ -4016,19 +3276,16 @@ with two lines.</p> </ol> "###, r###"List items (262)"### - ); +); assert_eq!( - micromark_with_options( - r###"- Foo + micromark_with_options(r###"- Foo bar baz -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li> <p>Foo</p> @@ -4041,71 +3298,59 @@ baz </ul> "###, r###"List items (263)"### - ); - - // To do: eol after containers. - // assert_eq!( - // micromark_with_options(r###"123456789. ok - // "###, DANGER), - // r###"<ol start="123456789"> - // <li>ok</li> - // </ol> - // "###, - // r###"List items (264)"### - // ); +); assert_eq!( - micromark_with_options( - r###"1234567890. not ok + micromark_with_options(r###"123456789. ok +"###, DANGER), + r###"<ol start="123456789"> +<li>ok</li> +</ol> "###, - DANGER - ), + r###"List items (264)"### +); + + assert_eq!( + micromark_with_options(r###"1234567890. not ok +"###, DANGER), r###"<p>1234567890. not ok</p> "###, r###"List items (265)"### - ); - - // To do: eol after containers. - // assert_eq!( - // micromark_with_options(r###"0. ok - // "###, DANGER), - // r###"<ol start="0"> - // <li>ok</li> - // </ol> - // "###, - // r###"List items (266)"### - // ); +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options(r###"003. ok - // "###, DANGER), - // r###"<ol start="3"> - // <li>ok</li> - // </ol> - // "###, - // r###"List items (267)"### - // ); + assert_eq!( + micromark_with_options(r###"0. ok +"###, DANGER), + r###"<ol start="0"> +<li>ok</li> +</ol> +"###, + r###"List items (266)"### +); assert_eq!( - micromark_with_options( - r###"-1. not ok + micromark_with_options(r###"003. ok +"###, DANGER), + r###"<ol start="3"> +<li>ok</li> +</ol> "###, - DANGER - ), + r###"List items (267)"### +); + + assert_eq!( + micromark_with_options(r###"-1. not ok +"###, DANGER), r###"<p>-1. not ok</p> "###, r###"List items (268)"### - ); +); assert_eq!( - micromark_with_options( - r###"- foo + micromark_with_options(r###"- foo bar -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li> <p>foo</p> @@ -4115,16 +3360,13 @@ baz </ul> "###, r###"List items (269)"### - ); +); assert_eq!( - micromark_with_options( - r###" 10. foo + micromark_with_options(r###" 10. foo bar -"###, - DANGER - ), +"###, DANGER), r###"<ol start="10"> <li> <p>foo</p> @@ -4134,18 +3376,15 @@ baz </ol> "###, r###"List items (270)"### - ); +); assert_eq!( - micromark_with_options( - r###" indented code + micromark_with_options(r###" indented code paragraph more code -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>indented code </code></pre> <p>paragraph</p> @@ -4153,18 +3392,15 @@ paragraph </code></pre> "###, r###"List items (271)"### - ); +); assert_eq!( - micromark_with_options( - r###"1. indented code + micromark_with_options(r###"1. indented code paragraph more code -"###, - DANGER - ), +"###, DANGER), r###"<ol> <li> <pre><code>indented code @@ -4176,18 +3412,15 @@ paragraph </ol> "###, r###"List items (272)"### - ); +); assert_eq!( - micromark_with_options( - r###"1. indented code + micromark_with_options(r###"1. indented code paragraph more code -"###, - DANGER - ), +"###, DANGER), r###"<ol> <li> <pre><code> indented code @@ -4199,46 +3432,37 @@ paragraph </ol> "###, r###"List items (273)"### - ); +); assert_eq!( - micromark_with_options( - r###" foo + micromark_with_options(r###" foo bar -"###, - DANGER - ), +"###, DANGER), r###"<p>foo</p> <p>bar</p> "###, r###"List items (274)"### - ); +); assert_eq!( - micromark_with_options( - r###"- foo + micromark_with_options(r###"- foo bar -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li>foo</li> </ul> <p>bar</p> "###, r###"List items (275)"### - ); +); assert_eq!( - micromark_with_options( - r###"- foo + micromark_with_options(r###"- foo bar -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li> <p>foo</p> @@ -4247,11 +3471,10 @@ bar </ul> "###, r###"List items (276)"### - ); +); assert_eq!( - micromark_with_options( - r###"- + micromark_with_options(r###"- foo - ``` @@ -4259,9 +3482,7 @@ bar ``` - baz -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li>foo</li> <li> @@ -4275,133 +3496,108 @@ bar </ul> "###, r###"List items (277)"### - ); +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options(r###"- - // foo - // "###, DANGER), - // r###"<ul> - // <li>foo</li> - // </ul> - // "###, - // r###"List items (278)"### - // ); + assert_eq!( + micromark_with_options(r###"- + foo +"###, DANGER), + r###"<ul> +<li>foo</li> +</ul> +"###, + r###"List items (278)"### +); assert_eq!( - micromark_with_options( - r###"- + micromark_with_options(r###"- foo -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li></li> </ul> <p>foo</p> "###, r###"List items (279)"### - ); +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"- foo - // - - // - bar - // "###, - // DANGER - // ), - // r###"<ul> - // <li>foo</li> - // <li></li> - // <li>bar</li> - // </ul> - // "###, - // r###"List items (280)"### - // ); + assert_eq!( + micromark_with_options(r###"- foo +- +- bar +"###, DANGER), + r###"<ul> +<li>foo</li> +<li></li> +<li>bar</li> +</ul> +"###, + r###"List items (280)"### +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"- foo - // - - // - bar - // "###, - // DANGER - // ), - // r###"<ul> - // <li>foo</li> - // <li></li> - // <li>bar</li> - // </ul> - // "###, - // r###"List items (281)"### - // ); + assert_eq!( + micromark_with_options(r###"- foo +- +- bar +"###, DANGER), + r###"<ul> +<li>foo</li> +<li></li> +<li>bar</li> +</ul> +"###, + r###"List items (281)"### +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"1. foo - // 2. - // 3. bar - // "###, - // DANGER - // ), - // r###"<ol> - // <li>foo</li> - // <li></li> - // <li>bar</li> - // </ol> - // "###, - // r###"List items (282)"### - // ); + assert_eq!( + micromark_with_options(r###"1. foo +2. +3. bar +"###, DANGER), + r###"<ol> +<li>foo</li> +<li></li> +<li>bar</li> +</ol> +"###, + r###"List items (282)"### +); - // To do: eol after containers. + // To do: some bug w/ line endings and empty items. // assert_eq!( - // micromark_with_options( - // r###"* - // "###, - // DANGER - // ), + // micromark_with_options(r###"* + // "###, DANGER), // r###"<ul> // <li></li> // </ul> // "###, // r###"List items (283)"### - // ); + // ); assert_eq!( - micromark_with_options( - r###"foo + micromark_with_options(r###"foo * foo 1. -"###, - DANGER - ), +"###, DANGER), r###"<p>foo *</p> <p>foo 1.</p> "###, r###"List items (284)"### - ); +); assert_eq!( - micromark_with_options( - r###" 1. A paragraph + micromark_with_options(r###" 1. A paragraph with two lines. indented code > A block quote. -"###, - DANGER - ), +"###, DANGER), r###"<ol> <li> <p>A paragraph @@ -4415,19 +3611,16 @@ with two lines.</p> </ol> "###, r###"List items (285)"### - ); +); assert_eq!( - micromark_with_options( - r###" 1. A paragraph + micromark_with_options(r###" 1. A paragraph with two lines. indented code > A block quote. -"###, - DANGER - ), +"###, DANGER), r###"<ol> <li> <p>A paragraph @@ -4441,19 +3634,16 @@ with two lines.</p> </ol> "###, r###"List items (286)"### - ); +); assert_eq!( - micromark_with_options( - r###" 1. A paragraph + micromark_with_options(r###" 1. A paragraph with two lines. indented code > A block quote. -"###, - DANGER - ), +"###, DANGER), r###"<ol> <li> <p>A paragraph @@ -4467,19 +3657,16 @@ with two lines.</p> </ol> "###, r###"List items (287)"### - ); +); assert_eq!( - micromark_with_options( - r###" 1. A paragraph + micromark_with_options(r###" 1. A paragraph with two lines. indented code > A block quote. -"###, - DANGER - ), +"###, DANGER), r###"<pre><code>1. A paragraph with two lines. @@ -4489,19 +3676,16 @@ with two lines.</p> </code></pre> "###, r###"List items (288)"### - ); +); assert_eq!( - micromark_with_options( - r###" 1. A paragraph + micromark_with_options(r###" 1. A paragraph with two lines. indented code > A block quote. -"###, - DANGER - ), +"###, DANGER), r###"<ol> <li> <p>A paragraph @@ -4515,32 +3699,26 @@ with two lines.</p> </ol> "###, r###"List items (289)"### - ); +); - // To do: eol after containers. + // To do: Some lazy bug. // assert_eq!( - // micromark_with_options( - // r###" 1. A paragraph + // micromark_with_options(r###" 1. A paragraph // with two lines. - // "###, - // DANGER - // ), + // "###, DANGER), // r###"<ol> // <li>A paragraph // with two lines.</li> // </ol> // "###, // r###"List items (290)"### - // ); + // ); - // To do: some bug with laziness. + // To do: Some lazy bug. // assert_eq!( - // micromark_with_options( - // r###"> 1. > Blockquote + // micromark_with_options(r###"> 1. > Blockquote // continued here. - // "###, - // DANGER - // ), + // "###, DANGER), // r###"<blockquote> // <ol> // <li> @@ -4553,16 +3731,13 @@ with two lines.</p> // </blockquote> // "###, // r###"List items (291)"### - // ); + // ); - // To do: some bug with laziness. + // To do: Some lazy bug. // assert_eq!( - // micromark_with_options( - // r###"> 1. > Blockquote + // micromark_with_options(r###"> 1. > Blockquote // > continued here. - // "###, - // DANGER - // ), + // "###, DANGER), // r###"<blockquote> // <ol> // <li> @@ -4575,255 +3750,205 @@ with two lines.</p> // </blockquote> // "###, // r###"List items (292)"### - // ); + // ); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"- foo - // - bar - // - baz - // - boo - // "###, - // DANGER - // ), - // r###"<ul> - // <li>foo - // <ul> - // <li>bar - // <ul> - // <li>baz - // <ul> - // <li>boo</li> - // </ul> - // </li> - // </ul> - // </li> - // </ul> - // </li> - // </ul> - // "###, - // r###"List items (293)"### - // ); + assert_eq!( + micromark_with_options(r###"- foo + - bar + - baz + - boo +"###, DANGER), + r###"<ul> +<li>foo +<ul> +<li>bar +<ul> +<li>baz +<ul> +<li>boo</li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +</ul> +"###, + r###"List items (293)"### +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"- foo - // - bar - // - baz - // - boo - // "###, - // DANGER - // ), - // r###"<ul> - // <li>foo</li> - // <li>bar</li> - // <li>baz</li> - // <li>boo</li> - // </ul> - // "###, - // r###"List items (294)"### - // ); + assert_eq!( + micromark_with_options(r###"- foo + - bar + - baz + - boo +"###, DANGER), + r###"<ul> +<li>foo</li> +<li>bar</li> +<li>baz</li> +<li>boo</li> +</ul> +"###, + r###"List items (294)"### +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"10) foo - // - bar - // "###, - // DANGER - // ), - // r###"<ol start="10"> - // <li>foo - // <ul> - // <li>bar</li> - // </ul> - // </li> - // </ol> - // "###, - // r###"List items (295)"### - // ); + assert_eq!( + micromark_with_options(r###"10) foo + - bar +"###, DANGER), + r###"<ol start="10"> +<li>foo +<ul> +<li>bar</li> +</ul> +</li> +</ol> +"###, + r###"List items (295)"### +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"10) foo - // - bar - // "###, - // DANGER - // ), - // r###"<ol start="10"> - // <li>foo</li> - // </ol> - // <ul> - // <li>bar</li> - // </ul> - // "###, - // r###"List items (296)"### - // ); + assert_eq!( + micromark_with_options(r###"10) foo + - bar +"###, DANGER), + r###"<ol start="10"> +<li>foo</li> +</ol> +<ul> +<li>bar</li> +</ul> +"###, + r###"List items (296)"### +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"- - foo - // "###, - // DANGER - // ), - // r###"<ul> - // <li> - // <ul> - // <li>foo</li> - // </ul> - // </li> - // </ul> - // "###, - // r###"List items (297)"### - // ); + assert_eq!( + micromark_with_options(r###"- - foo +"###, DANGER), + r###"<ul> +<li> +<ul> +<li>foo</li> +</ul> +</li> +</ul> +"###, + r###"List items (297)"### +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"1. - 2. foo - // "###, - // DANGER - // ), - // r###"<ol> - // <li> - // <ul> - // <li> - // <ol start="2"> - // <li>foo</li> - // </ol> - // </li> - // </ul> - // </li> - // </ol> - // "###, - // r###"List items (298)"### - // ); + assert_eq!( + micromark_with_options(r###"1. - 2. foo +"###, DANGER), + r###"<ol> +<li> +<ul> +<li> +<ol start="2"> +<li>foo</li> +</ol> +</li> +</ul> +</li> +</ol> +"###, + r###"List items (298)"### +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"- # Foo - // - Bar - // --- - // baz - // "###, - // DANGER - // ), - // r###"<ul> - // <li> - // <h1>Foo</h1> - // </li> - // <li> - // <h2>Bar</h2> - // baz</li> - // </ul> - // "###, - // r###"List items (299)"### - // ); + assert_eq!( + micromark_with_options(r###"- # Foo +- Bar + --- + baz +"###, DANGER), + r###"<ul> +<li> +<h1>Foo</h1> +</li> +<li> +<h2>Bar</h2> +baz</li> +</ul> +"###, + r###"List items (299)"### +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"- foo - // - bar - // + baz - // "###, - // DANGER - // ), - // r###"<ul> - // <li>foo</li> - // <li>bar</li> - // </ul> - // <ul> - // <li>baz</li> - // </ul> - // "###, - // r###"Lists (300)"### - // ); + assert_eq!( + micromark_with_options(r###"- foo +- bar ++ baz +"###, DANGER), + r###"<ul> +<li>foo</li> +<li>bar</li> +</ul> +<ul> +<li>baz</li> +</ul> +"###, + r###"Lists (300)"### +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"1. foo - // 2. bar - // 3) baz - // "###, - // DANGER - // ), - // r###"<ol> - // <li>foo</li> - // <li>bar</li> - // </ol> - // <ol start="3"> - // <li>baz</li> - // </ol> - // "###, - // r###"Lists (301)"### - // ); + assert_eq!( + micromark_with_options(r###"1. foo +2. bar +3) baz +"###, DANGER), + r###"<ol> +<li>foo</li> +<li>bar</li> +</ol> +<ol start="3"> +<li>baz</li> +</ol> +"###, + r###"Lists (301)"### +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"Foo - // - bar - // - baz - // "###, - // DANGER - // ), - // r###"<p>Foo</p> - // <ul> - // <li>bar</li> - // <li>baz</li> - // </ul> - // "###, - // r###"Lists (302)"### - // ); + assert_eq!( + micromark_with_options(r###"Foo +- bar +- baz +"###, DANGER), + r###"<p>Foo</p> +<ul> +<li>bar</li> +<li>baz</li> +</ul> +"###, + r###"Lists (302)"### +); - // To do: some bug with interrupting. + // To do: Some interruption bug. // assert_eq!( - // micromark_with_options( - // r###"The number of windows in my house is + // micromark_with_options(r###"The number of windows in my house is // 14. The number of doors is 6. - // "###, - // DANGER - // ), + // "###, DANGER), // r###"<p>The number of windows in my house is // 14. The number of doors is 6.</p> // "###, // r###"Lists (303)"### - // ); + // ); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"The number of windows in my house is - // 1. The number of doors is 6. - // "###, - // DANGER - // ), - // r###"<p>The number of windows in my house is</p> - // <ol> - // <li>The number of doors is 6.</li> - // </ol> - // "###, - // r###"Lists (304)"### - // ); + assert_eq!( + micromark_with_options(r###"The number of windows in my house is +1. The number of doors is 6. +"###, DANGER), + r###"<p>The number of windows in my house is</p> +<ol> +<li>The number of doors is 6.</li> +</ol> +"###, + r###"Lists (304)"### +); assert_eq!( - micromark_with_options( - r###"- foo + micromark_with_options(r###"- foo - bar - baz -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li> <p>foo</p> @@ -4837,19 +3962,16 @@ with two lines.</p> </ul> "###, r###"Lists (305)"### - ); +); assert_eq!( - micromark_with_options( - r###"- foo + micromark_with_options(r###"- foo - bar - baz bim -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li>foo <ul> @@ -4866,37 +3988,32 @@ with two lines.</p> </ul> "###, r###"Lists (306)"### - ); +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"- foo - // - bar + assert_eq!( + micromark_with_options(r###"- foo +- bar - // <!-- --> +<!-- --> - // - baz - // - bim - // "###, - // DANGER - // ), - // r###"<ul> - // <li>foo</li> - // <li>bar</li> - // </ul> - // <!-- --> - // <ul> - // <li>baz</li> - // <li>bim</li> - // </ul> - // "###, - // r###"Lists (307)"### - // ); +- baz +- bim +"###, DANGER), + r###"<ul> +<li>foo</li> +<li>bar</li> +</ul> +<!-- --> +<ul> +<li>baz</li> +<li>bim</li> +</ul> +"###, + r###"Lists (307)"### +); assert_eq!( - micromark_with_options( - r###"- foo + micromark_with_options(r###"- foo notcode @@ -4905,9 +4022,7 @@ with two lines.</p> <!-- --> code -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li> <p>foo</p> @@ -4922,44 +4037,37 @@ with two lines.</p> </code></pre> "###, r###"Lists (308)"### - ); +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"- a - // - b - // - c - // - d - // - e - // - f - // - g - // "###, - // DANGER - // ), - // r###"<ul> - // <li>a</li> - // <li>b</li> - // <li>c</li> - // <li>d</li> - // <li>e</li> - // <li>f</li> - // <li>g</li> - // </ul> - // "###, - // r###"Lists (309)"### - // ); + assert_eq!( + micromark_with_options(r###"- a + - b + - c + - d + - e + - f +- g +"###, DANGER), + r###"<ul> +<li>a</li> +<li>b</li> +<li>c</li> +<li>d</li> +<li>e</li> +<li>f</li> +<li>g</li> +</ul> +"###, + r###"Lists (309)"### +); assert_eq!( - micromark_with_options( - r###"1. a + micromark_with_options(r###"1. a 2. b 3. c -"###, - DANGER - ), +"###, DANGER), r###"<ol> <li> <p>a</p> @@ -4973,19 +4081,16 @@ with two lines.</p> </ol> "###, r###"Lists (310)"### - ); +); - // To do: some bug with interrupting. + // To do: Some interruption bug. // assert_eq!( - // micromark_with_options( - // r###"- a + // micromark_with_options(r###"- a // - b // - c // - d // - e - // "###, - // DANGER - // ), + // "###, DANGER), // r###"<ul> // <li>a</li> // <li>b</li> @@ -4995,18 +4100,15 @@ with two lines.</p> // </ul> // "###, // r###"Lists (311)"### - // ); + // ); assert_eq!( - micromark_with_options( - r###"1. a + micromark_with_options(r###"1. a 2. b 3. c -"###, - DANGER - ), +"###, DANGER), r###"<ol> <li> <p>a</p> @@ -5019,17 +4121,14 @@ with two lines.</p> </code></pre> "###, r###"Lists (312)"### - ); +); assert_eq!( - micromark_with_options( - r###"- a + micromark_with_options(r###"- a - b - c -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li> <p>a</p> @@ -5043,17 +4142,14 @@ with two lines.</p> </ul> "###, r###"Lists (313)"### - ); +); assert_eq!( - micromark_with_options( - r###"* a + micromark_with_options(r###"* a * * c -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li> <p>a</p> @@ -5065,18 +4161,15 @@ with two lines.</p> </ul> "###, r###"Lists (314)"### - ); +); assert_eq!( - micromark_with_options( - r###"- a + micromark_with_options(r###"- a - b c - d -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li> <p>a</p> @@ -5091,18 +4184,15 @@ with two lines.</p> </ul> "###, r###"Lists (315)"### - ); +); assert_eq!( - micromark_with_options( - r###"- a + micromark_with_options(r###"- a - b [ref]: /url - d -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li> <p>a</p> @@ -5116,150 +4206,125 @@ with two lines.</p> </ul> "###, r###"Lists (316)"### - ); +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"- a - // - ``` - // b + assert_eq!( + micromark_with_options(r###"- a +- ``` + b - // ``` - // - c - // "###, - // DANGER - // ), - // r###"<ul> - // <li>a</li> - // <li> - // <pre><code>b - // </code></pre> - // </li> - // <li>c</li> - // </ul> - // "###, - // r###"Lists (317)"### - // ); + ``` +- c +"###, DANGER), + r###"<ul> +<li>a</li> +<li> +<pre><code>b - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"- a - // - b - // c - // - d - // "###, - // DANGER - // ), - // r###"<ul> - // <li>a - // <ul> - // <li> - // <p>b</p> - // <p>c</p> - // </li> - // </ul> - // </li> - // <li>d</li> - // </ul> - // "###, - // r###"Lists (318)"### - // ); +</code></pre> +</li> +<li>c</li> +</ul> +"###, + r###"Lists (317)"### +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"* a - // > b - // > - // * c - // "###, - // DANGER - // ), - // r###"<ul> - // <li>a - // <blockquote> - // <p>b</p> - // </blockquote> - // </li> - // <li>c</li> - // </ul> - // "###, - // r###"Lists (319)"### - // ); + assert_eq!( + micromark_with_options(r###"- a + - b - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"- a - // > b - // ``` - // c - // ``` - // - d - // "###, - // DANGER - // ), - // r###"<ul> - // <li>a - // <blockquote> - // <p>b</p> - // </blockquote> - // <pre><code>c - // </code></pre> - // </li> - // <li>d</li> - // </ul> - // "###, - // r###"Lists (320)"### - // ); + c +- d +"###, DANGER), + r###"<ul> +<li>a +<ul> +<li> +<p>b</p> +<p>c</p> +</li> +</ul> +</li> +<li>d</li> +</ul> +"###, + r###"Lists (318)"### +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"- a - // "###, - // DANGER - // ), - // r###"<ul> - // <li>a</li> - // </ul> - // "###, - // r###"Lists (321)"### - // ); + assert_eq!( + micromark_with_options(r###"* a + > b + > +* c +"###, DANGER), + r###"<ul> +<li>a +<blockquote> +<p>b</p> +</blockquote> +</li> +<li>c</li> +</ul> +"###, + r###"Lists (319)"### +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"- a - // - b - // "###, - // DANGER - // ), - // r###"<ul> - // <li>a - // <ul> - // <li>b</li> - // </ul> - // </li> - // </ul> - // "###, - // r###"Lists (322)"### - // ); + assert_eq!( + micromark_with_options(r###"- a + > b + ``` + c + ``` +- d +"###, DANGER), + r###"<ul> +<li>a +<blockquote> +<p>b</p> +</blockquote> +<pre><code>c +</code></pre> +</li> +<li>d</li> +</ul> +"###, + r###"Lists (320)"### +); + + assert_eq!( + micromark_with_options(r###"- a +"###, DANGER), + r###"<ul> +<li>a</li> +</ul> +"###, + r###"Lists (321)"### +); + + assert_eq!( + micromark_with_options(r###"- a + - b +"###, DANGER), + r###"<ul> +<li>a +<ul> +<li>b</li> +</ul> +</li> +</ul> +"###, + r###"Lists (322)"### +); assert_eq!( - micromark_with_options( - r###"1. ``` + micromark_with_options(r###"1. ``` foo ``` bar -"###, - DANGER - ), +"###, DANGER), r###"<ol> <li> <pre><code>foo @@ -5269,17 +4334,14 @@ with two lines.</p> </ol> "###, r###"Lists (323)"### - ); +); assert_eq!( - micromark_with_options( - r###"* foo + micromark_with_options(r###"* foo * bar baz -"###, - DANGER - ), +"###, DANGER), r###"<ul> <li> <p>foo</p> @@ -5291,3854 +4353,2864 @@ with two lines.</p> </ul> "###, r###"Lists (324)"### - ); +); - // To do: eol after containers. - // assert_eq!( - // micromark_with_options( - // r###"- a - // - b - // - c + assert_eq!( + micromark_with_options(r###"- a + - b + - c - // - d - // - e - // - f - // "###, - // DANGER - // ), - // r###"<ul> - // <li> - // <p>a</p> - // <ul> - // <li>b</li> - // <li>c</li> - // </ul> - // </li> - // <li> - // <p>d</p> - // <ul> - // <li>e</li> - // <li>f</li> - // </ul> - // </li> - // </ul> - // "###, - // r###"Lists (325)"### - // ); +- d + - e + - f +"###, DANGER), + r###"<ul> +<li> +<p>a</p> +<ul> +<li>b</li> +<li>c</li> +</ul> +</li> +<li> +<p>d</p> +<ul> +<li>e</li> +<li>f</li> +</ul> +</li> +</ul> +"###, + r###"Lists (325)"### +); assert_eq!( - micromark_with_options( - r###"`hi`lo` -"###, - DANGER - ), + micromark_with_options(r###"`hi`lo` +"###, DANGER), r###"<p><code>hi</code>lo`</p> "###, r###"Inlines (326)"### - ); +); assert_eq!( - micromark_with_options( - r###"`foo` -"###, - DANGER - ), + micromark_with_options(r###"`foo` +"###, DANGER), r###"<p><code>foo</code></p> "###, r###"Code spans (327)"### - ); +); assert_eq!( - micromark_with_options( - r###"`` foo ` bar `` -"###, - DANGER - ), + micromark_with_options(r###"`` foo ` bar `` +"###, DANGER), r###"<p><code>foo ` bar</code></p> "###, r###"Code spans (328)"### - ); +); assert_eq!( - micromark_with_options( - r###"` `` ` -"###, - DANGER - ), + micromark_with_options(r###"` `` ` +"###, DANGER), r###"<p><code>``</code></p> "###, r###"Code spans (329)"### - ); +); assert_eq!( - micromark_with_options( - r###"` `` ` -"###, - DANGER - ), + micromark_with_options(r###"` `` ` +"###, DANGER), r###"<p><code> `` </code></p> "###, r###"Code spans (330)"### - ); +); assert_eq!( - micromark_with_options( - r###"` a` -"###, - DANGER - ), + micromark_with_options(r###"` a` +"###, DANGER), r###"<p><code> a</code></p> "###, r###"Code spans (331)"### - ); +); assert_eq!( - micromark_with_options( - r###"` b ` -"###, - DANGER - ), + micromark_with_options(r###"` b ` +"###, DANGER), r###"<p><code> b </code></p> "###, r###"Code spans (332)"### - ); +); assert_eq!( - micromark_with_options( - r###"` ` + micromark_with_options(r###"` ` ` ` -"###, - DANGER - ), +"###, DANGER), r###"<p><code> </code> <code> </code></p> "###, r###"Code spans (333)"### - ); +); - // To do: some bug with generating tests. - // assert_eq!( - // micromark_with_options( - // r###"`` - // foo - // bar - // baz - // `` - // "###, - // DANGER - // ), - // r###"<p><code>foo bar baz</code></p> - // "###, - // r###"Code spans (334)"### - // ); - - // To do: bug with a line ending sticking around? Generating this file? - // assert_eq!( - // micromark_with_options( - // r###"`` - // foo - // `` - // "###, - // DANGER - // ), - // r###"<p><code>foo </code></p> - // "###, - // r###"Code spans (335)"### - // ); + assert_eq!( + micromark_with_options(r###"`` +foo +bar +baz +`` +"###, DANGER), + r###"<p><code>foo bar baz</code></p> +"###, + r###"Code spans (334)"### +); - // To do: bug generating this file? - // assert_eq!( - // micromark_with_options( - // r###"`foo bar - // baz` - // "###, - // DANGER - // ), - // r###"<p><code>foo bar baz</code></p> - // "###, - // r###"Code spans (336)"### - // ); + assert_eq!( + micromark_with_options(r###"`` +foo +`` +"###, DANGER), + r###"<p><code>foo </code></p> +"###, + r###"Code spans (335)"### +); assert_eq!( - micromark_with_options( - r###"`foo\`bar` + micromark_with_options(r###"`foo bar +baz` +"###, DANGER), + r###"<p><code>foo bar baz</code></p> "###, - DANGER - ), + r###"Code spans (336)"### +); + + assert_eq!( + micromark_with_options(r###"`foo\`bar` +"###, DANGER), r###"<p><code>foo\</code>bar`</p> "###, r###"Code spans (337)"### - ); +); assert_eq!( - micromark_with_options( - r###"``foo`bar`` -"###, - DANGER - ), + micromark_with_options(r###"``foo`bar`` +"###, DANGER), r###"<p><code>foo`bar</code></p> "###, r###"Code spans (338)"### - ); +); assert_eq!( - micromark_with_options( - r###"` foo `` bar ` -"###, - DANGER - ), + micromark_with_options(r###"` foo `` bar ` +"###, DANGER), r###"<p><code>foo `` bar</code></p> "###, r###"Code spans (339)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo`*` -"###, - DANGER - ), + micromark_with_options(r###"*foo`*` +"###, DANGER), r###"<p>*foo<code>*</code></p> "###, r###"Code spans (340)"### - ); +); assert_eq!( - micromark_with_options( - r###"[not a `link](/foo`) -"###, - DANGER - ), + micromark_with_options(r###"[not a `link](/foo`) +"###, DANGER), r###"<p>[not a <code>link](/foo</code>)</p> "###, r###"Code spans (341)"### - ); +); assert_eq!( - micromark_with_options( - r###"`<a href="`">` -"###, - DANGER - ), + micromark_with_options(r###"`<a href="`">` +"###, DANGER), r###"<p><code><a href="</code>">`</p> "###, r###"Code spans (342)"### - ); +); assert_eq!( - micromark_with_options( - r###"<a href="`">` -"###, - DANGER - ), + micromark_with_options(r###"<a href="`">` +"###, DANGER), r###"<p><a href="`">`</p> "###, r###"Code spans (343)"### - ); +); assert_eq!( - micromark_with_options( - r###"`<http://foo.bar.`baz>` -"###, - DANGER - ), + micromark_with_options(r###"`<http://foo.bar.`baz>` +"###, DANGER), r###"<p><code><http://foo.bar.</code>baz>`</p> "###, r###"Code spans (344)"### - ); +); assert_eq!( - micromark_with_options( - r###"<http://foo.bar.`baz>` -"###, - DANGER - ), + micromark_with_options(r###"<http://foo.bar.`baz>` +"###, DANGER), r###"<p><a href="http://foo.bar.%60baz">http://foo.bar.`baz</a>`</p> "###, r###"Code spans (345)"### - ); +); assert_eq!( - micromark_with_options( - r###"```foo`` -"###, - DANGER - ), + micromark_with_options(r###"```foo`` +"###, DANGER), r###"<p>```foo``</p> "###, r###"Code spans (346)"### - ); +); assert_eq!( - micromark_with_options( - r###"`foo -"###, - DANGER - ), + micromark_with_options(r###"`foo +"###, DANGER), r###"<p>`foo</p> "###, r###"Code spans (347)"### - ); +); assert_eq!( - micromark_with_options( - r###"`foo``bar`` -"###, - DANGER - ), + micromark_with_options(r###"`foo``bar`` +"###, DANGER), r###"<p>`foo<code>bar</code></p> "###, r###"Code spans (348)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo bar* -"###, - DANGER - ), + micromark_with_options(r###"*foo bar* +"###, DANGER), r###"<p><em>foo bar</em></p> "###, r###"Emphasis and strong emphasis (349)"### - ); +); assert_eq!( - micromark_with_options( - r###"a * foo bar* -"###, - DANGER - ), + micromark_with_options(r###"a * foo bar* +"###, DANGER), r###"<p>a * foo bar*</p> "###, r###"Emphasis and strong emphasis (350)"### - ); +); assert_eq!( - micromark_with_options( - r###"a*"foo"* -"###, - DANGER - ), + micromark_with_options(r###"a*"foo"* +"###, DANGER), r###"<p>a*"foo"*</p> "###, r###"Emphasis and strong emphasis (351)"### - ); +); assert_eq!( - micromark_with_options( - r###"* a * -"###, - DANGER - ), + micromark_with_options(r###"* a * +"###, DANGER), r###"<p>* a *</p> "###, r###"Emphasis and strong emphasis (352)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo*bar* -"###, - DANGER - ), + micromark_with_options(r###"foo*bar* +"###, DANGER), r###"<p>foo<em>bar</em></p> "###, r###"Emphasis and strong emphasis (353)"### - ); +); assert_eq!( - micromark_with_options( - r###"5*6*78 -"###, - DANGER - ), + micromark_with_options(r###"5*6*78 +"###, DANGER), r###"<p>5<em>6</em>78</p> "###, r###"Emphasis and strong emphasis (354)"### - ); +); assert_eq!( - micromark_with_options( - r###"_foo bar_ -"###, - DANGER - ), + micromark_with_options(r###"_foo bar_ +"###, DANGER), r###"<p><em>foo bar</em></p> "###, r###"Emphasis and strong emphasis (355)"### - ); +); assert_eq!( - micromark_with_options( - r###"_ foo bar_ -"###, - DANGER - ), + micromark_with_options(r###"_ foo bar_ +"###, DANGER), r###"<p>_ foo bar_</p> "###, r###"Emphasis and strong emphasis (356)"### - ); +); assert_eq!( - micromark_with_options( - r###"a_"foo"_ -"###, - DANGER - ), + micromark_with_options(r###"a_"foo"_ +"###, DANGER), r###"<p>a_"foo"_</p> "###, r###"Emphasis and strong emphasis (357)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo_bar_ -"###, - DANGER - ), + micromark_with_options(r###"foo_bar_ +"###, DANGER), r###"<p>foo_bar_</p> "###, r###"Emphasis and strong emphasis (358)"### - ); +); assert_eq!( - micromark_with_options( - r###"5_6_78 -"###, - DANGER - ), + micromark_with_options(r###"5_6_78 +"###, DANGER), r###"<p>5_6_78</p> "###, r###"Emphasis and strong emphasis (359)"### - ); +); assert_eq!( - micromark_with_options( - r###"пристаням_стремятся_ -"###, - DANGER - ), + micromark_with_options(r###"пристаням_стремятся_ +"###, DANGER), r###"<p>пристаням_стремятся_</p> "###, r###"Emphasis and strong emphasis (360)"### - ); +); assert_eq!( - micromark_with_options( - r###"aa_"bb"_cc -"###, - DANGER - ), + micromark_with_options(r###"aa_"bb"_cc +"###, DANGER), r###"<p>aa_"bb"_cc</p> "###, r###"Emphasis and strong emphasis (361)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo-_(bar)_ -"###, - DANGER - ), + micromark_with_options(r###"foo-_(bar)_ +"###, DANGER), r###"<p>foo-<em>(bar)</em></p> "###, r###"Emphasis and strong emphasis (362)"### - ); +); assert_eq!( - micromark_with_options( - r###"_foo* -"###, - DANGER - ), + micromark_with_options(r###"_foo* +"###, DANGER), r###"<p>_foo*</p> "###, r###"Emphasis and strong emphasis (363)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo bar * -"###, - DANGER - ), + micromark_with_options(r###"*foo bar * +"###, DANGER), r###"<p>*foo bar *</p> "###, r###"Emphasis and strong emphasis (364)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo bar + micromark_with_options(r###"*foo bar * -"###, - DANGER - ), +"###, DANGER), r###"<p>*foo bar *</p> "###, r###"Emphasis and strong emphasis (365)"### - ); +); assert_eq!( - micromark_with_options( - r###"*(*foo) -"###, - DANGER - ), + micromark_with_options(r###"*(*foo) +"###, DANGER), r###"<p>*(*foo)</p> "###, r###"Emphasis and strong emphasis (366)"### - ); +); assert_eq!( - micromark_with_options( - r###"*(*foo*)* -"###, - DANGER - ), + micromark_with_options(r###"*(*foo*)* +"###, DANGER), r###"<p><em>(<em>foo</em>)</em></p> "###, r###"Emphasis and strong emphasis (367)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo*bar -"###, - DANGER - ), + micromark_with_options(r###"*foo*bar +"###, DANGER), r###"<p><em>foo</em>bar</p> "###, r###"Emphasis and strong emphasis (368)"### - ); +); assert_eq!( - micromark_with_options( - r###"_foo bar _ -"###, - DANGER - ), + micromark_with_options(r###"_foo bar _ +"###, DANGER), r###"<p>_foo bar _</p> "###, r###"Emphasis and strong emphasis (369)"### - ); +); assert_eq!( - micromark_with_options( - r###"_(_foo) -"###, - DANGER - ), + micromark_with_options(r###"_(_foo) +"###, DANGER), r###"<p>_(_foo)</p> "###, r###"Emphasis and strong emphasis (370)"### - ); +); assert_eq!( - micromark_with_options( - r###"_(_foo_)_ -"###, - DANGER - ), + micromark_with_options(r###"_(_foo_)_ +"###, DANGER), r###"<p><em>(<em>foo</em>)</em></p> "###, r###"Emphasis and strong emphasis (371)"### - ); +); assert_eq!( - micromark_with_options( - r###"_foo_bar -"###, - DANGER - ), + micromark_with_options(r###"_foo_bar +"###, DANGER), r###"<p>_foo_bar</p> "###, r###"Emphasis and strong emphasis (372)"### - ); +); assert_eq!( - micromark_with_options( - r###"_пристаням_стремятся -"###, - DANGER - ), + micromark_with_options(r###"_пристаням_стремятся +"###, DANGER), r###"<p>_пристаням_стремятся</p> "###, r###"Emphasis and strong emphasis (373)"### - ); +); assert_eq!( - micromark_with_options( - r###"_foo_bar_baz_ -"###, - DANGER - ), + micromark_with_options(r###"_foo_bar_baz_ +"###, DANGER), r###"<p><em>foo_bar_baz</em></p> "###, r###"Emphasis and strong emphasis (374)"### - ); +); assert_eq!( - micromark_with_options( - r###"_(bar)_. -"###, - DANGER - ), + micromark_with_options(r###"_(bar)_. +"###, DANGER), r###"<p><em>(bar)</em>.</p> "###, r###"Emphasis and strong emphasis (375)"### - ); +); assert_eq!( - micromark_with_options( - r###"**foo bar** -"###, - DANGER - ), + micromark_with_options(r###"**foo bar** +"###, DANGER), r###"<p><strong>foo bar</strong></p> "###, r###"Emphasis and strong emphasis (376)"### - ); +); assert_eq!( - micromark_with_options( - r###"** foo bar** -"###, - DANGER - ), + micromark_with_options(r###"** foo bar** +"###, DANGER), r###"<p>** foo bar**</p> "###, r###"Emphasis and strong emphasis (377)"### - ); +); assert_eq!( - micromark_with_options( - r###"a**"foo"** -"###, - DANGER - ), + micromark_with_options(r###"a**"foo"** +"###, DANGER), r###"<p>a**"foo"**</p> "###, r###"Emphasis and strong emphasis (378)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo**bar** -"###, - DANGER - ), + micromark_with_options(r###"foo**bar** +"###, DANGER), r###"<p>foo<strong>bar</strong></p> "###, r###"Emphasis and strong emphasis (379)"### - ); +); assert_eq!( - micromark_with_options( - r###"__foo bar__ -"###, - DANGER - ), + micromark_with_options(r###"__foo bar__ +"###, DANGER), r###"<p><strong>foo bar</strong></p> "###, r###"Emphasis and strong emphasis (380)"### - ); +); assert_eq!( - micromark_with_options( - r###"__ foo bar__ -"###, - DANGER - ), + micromark_with_options(r###"__ foo bar__ +"###, DANGER), r###"<p>__ foo bar__</p> "###, r###"Emphasis and strong emphasis (381)"### - ); +); assert_eq!( - micromark_with_options( - r###"__ + micromark_with_options(r###"__ foo bar__ -"###, - DANGER - ), +"###, DANGER), r###"<p>__ foo bar__</p> "###, r###"Emphasis and strong emphasis (382)"### - ); +); assert_eq!( - micromark_with_options( - r###"a__"foo"__ -"###, - DANGER - ), + micromark_with_options(r###"a__"foo"__ +"###, DANGER), r###"<p>a__"foo"__</p> "###, r###"Emphasis and strong emphasis (383)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo__bar__ -"###, - DANGER - ), + micromark_with_options(r###"foo__bar__ +"###, DANGER), r###"<p>foo__bar__</p> "###, r###"Emphasis and strong emphasis (384)"### - ); +); assert_eq!( - micromark_with_options( - r###"5__6__78 -"###, - DANGER - ), + micromark_with_options(r###"5__6__78 +"###, DANGER), r###"<p>5__6__78</p> "###, r###"Emphasis and strong emphasis (385)"### - ); +); assert_eq!( - micromark_with_options( - r###"пристаням__стремятся__ -"###, - DANGER - ), + micromark_with_options(r###"пристаням__стремятся__ +"###, DANGER), r###"<p>пристаням__стремятся__</p> "###, r###"Emphasis and strong emphasis (386)"### - ); +); assert_eq!( - micromark_with_options( - r###"__foo, __bar__, baz__ -"###, - DANGER - ), + micromark_with_options(r###"__foo, __bar__, baz__ +"###, DANGER), r###"<p><strong>foo, <strong>bar</strong>, baz</strong></p> "###, r###"Emphasis and strong emphasis (387)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo-__(bar)__ -"###, - DANGER - ), + micromark_with_options(r###"foo-__(bar)__ +"###, DANGER), r###"<p>foo-<strong>(bar)</strong></p> "###, r###"Emphasis and strong emphasis (388)"### - ); +); assert_eq!( - micromark_with_options( - r###"**foo bar ** -"###, - DANGER - ), + micromark_with_options(r###"**foo bar ** +"###, DANGER), r###"<p>**foo bar **</p> "###, r###"Emphasis and strong emphasis (389)"### - ); +); assert_eq!( - micromark_with_options( - r###"**(**foo) -"###, - DANGER - ), + micromark_with_options(r###"**(**foo) +"###, DANGER), r###"<p>**(**foo)</p> "###, r###"Emphasis and strong emphasis (390)"### - ); +); assert_eq!( - micromark_with_options( - r###"*(**foo**)* -"###, - DANGER - ), + micromark_with_options(r###"*(**foo**)* +"###, DANGER), r###"<p><em>(<strong>foo</strong>)</em></p> "###, r###"Emphasis and strong emphasis (391)"### - ); +); assert_eq!( - micromark_with_options( - r###"**Gomphocarpus (*Gomphocarpus physocarpus*, syn. + micromark_with_options(r###"**Gomphocarpus (*Gomphocarpus physocarpus*, syn. *Asclepias physocarpa*)** -"###, - DANGER - ), +"###, DANGER), r###"<p><strong>Gomphocarpus (<em>Gomphocarpus physocarpus</em>, syn. <em>Asclepias physocarpa</em>)</strong></p> "###, r###"Emphasis and strong emphasis (392)"### - ); +); assert_eq!( - micromark_with_options( - r###"**foo "*bar*" foo** -"###, - DANGER - ), + micromark_with_options(r###"**foo "*bar*" foo** +"###, DANGER), r###"<p><strong>foo "<em>bar</em>" foo</strong></p> "###, r###"Emphasis and strong emphasis (393)"### - ); +); assert_eq!( - micromark_with_options( - r###"**foo**bar -"###, - DANGER - ), + micromark_with_options(r###"**foo**bar +"###, DANGER), r###"<p><strong>foo</strong>bar</p> "###, r###"Emphasis and strong emphasis (394)"### - ); +); assert_eq!( - micromark_with_options( - r###"__foo bar __ -"###, - DANGER - ), + micromark_with_options(r###"__foo bar __ +"###, DANGER), r###"<p>__foo bar __</p> "###, r###"Emphasis and strong emphasis (395)"### - ); +); assert_eq!( - micromark_with_options( - r###"__(__foo) -"###, - DANGER - ), + micromark_with_options(r###"__(__foo) +"###, DANGER), r###"<p>__(__foo)</p> "###, r###"Emphasis and strong emphasis (396)"### - ); +); assert_eq!( - micromark_with_options( - r###"_(__foo__)_ -"###, - DANGER - ), + micromark_with_options(r###"_(__foo__)_ +"###, DANGER), r###"<p><em>(<strong>foo</strong>)</em></p> "###, r###"Emphasis and strong emphasis (397)"### - ); +); assert_eq!( - micromark_with_options( - r###"__foo__bar -"###, - DANGER - ), + micromark_with_options(r###"__foo__bar +"###, DANGER), r###"<p>__foo__bar</p> "###, r###"Emphasis and strong emphasis (398)"### - ); +); assert_eq!( - micromark_with_options( - r###"__пристаням__стремятся -"###, - DANGER - ), + micromark_with_options(r###"__пристаням__стремятся +"###, DANGER), r###"<p>__пристаням__стремятся</p> "###, r###"Emphasis and strong emphasis (399)"### - ); +); assert_eq!( - micromark_with_options( - r###"__foo__bar__baz__ -"###, - DANGER - ), + micromark_with_options(r###"__foo__bar__baz__ +"###, DANGER), r###"<p><strong>foo__bar__baz</strong></p> "###, r###"Emphasis and strong emphasis (400)"### - ); +); assert_eq!( - micromark_with_options( - r###"__(bar)__. -"###, - DANGER - ), + micromark_with_options(r###"__(bar)__. +"###, DANGER), r###"<p><strong>(bar)</strong>.</p> "###, r###"Emphasis and strong emphasis (401)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo [bar](/url)* -"###, - DANGER - ), + micromark_with_options(r###"*foo [bar](/url)* +"###, DANGER), r###"<p><em>foo <a href="/url">bar</a></em></p> "###, r###"Emphasis and strong emphasis (402)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo + micromark_with_options(r###"*foo bar* -"###, - DANGER - ), +"###, DANGER), r###"<p><em>foo bar</em></p> "###, r###"Emphasis and strong emphasis (403)"### - ); +); assert_eq!( - micromark_with_options( - r###"_foo __bar__ baz_ -"###, - DANGER - ), + micromark_with_options(r###"_foo __bar__ baz_ +"###, DANGER), r###"<p><em>foo <strong>bar</strong> baz</em></p> "###, r###"Emphasis and strong emphasis (404)"### - ); +); assert_eq!( - micromark_with_options( - r###"_foo _bar_ baz_ -"###, - DANGER - ), + micromark_with_options(r###"_foo _bar_ baz_ +"###, DANGER), r###"<p><em>foo <em>bar</em> baz</em></p> "###, r###"Emphasis and strong emphasis (405)"### - ); +); assert_eq!( - micromark_with_options( - r###"__foo_ bar_ -"###, - DANGER - ), + micromark_with_options(r###"__foo_ bar_ +"###, DANGER), r###"<p><em><em>foo</em> bar</em></p> "###, r###"Emphasis and strong emphasis (406)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo *bar** -"###, - DANGER - ), + micromark_with_options(r###"*foo *bar** +"###, DANGER), r###"<p><em>foo <em>bar</em></em></p> "###, r###"Emphasis and strong emphasis (407)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo **bar** baz* -"###, - DANGER - ), + micromark_with_options(r###"*foo **bar** baz* +"###, DANGER), r###"<p><em>foo <strong>bar</strong> baz</em></p> "###, r###"Emphasis and strong emphasis (408)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo**bar**baz* -"###, - DANGER - ), + micromark_with_options(r###"*foo**bar**baz* +"###, DANGER), r###"<p><em>foo<strong>bar</strong>baz</em></p> "###, r###"Emphasis and strong emphasis (409)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo**bar* -"###, - DANGER - ), + micromark_with_options(r###"*foo**bar* +"###, DANGER), r###"<p><em>foo**bar</em></p> "###, r###"Emphasis and strong emphasis (410)"### - ); +); assert_eq!( - micromark_with_options( - r###"***foo** bar* -"###, - DANGER - ), + micromark_with_options(r###"***foo** bar* +"###, DANGER), r###"<p><em><strong>foo</strong> bar</em></p> "###, r###"Emphasis and strong emphasis (411)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo **bar*** -"###, - DANGER - ), + micromark_with_options(r###"*foo **bar*** +"###, DANGER), r###"<p><em>foo <strong>bar</strong></em></p> "###, r###"Emphasis and strong emphasis (412)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo**bar*** -"###, - DANGER - ), + micromark_with_options(r###"*foo**bar*** +"###, DANGER), r###"<p><em>foo<strong>bar</strong></em></p> "###, r###"Emphasis and strong emphasis (413)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo***bar***baz -"###, - DANGER - ), + micromark_with_options(r###"foo***bar***baz +"###, DANGER), r###"<p>foo<em><strong>bar</strong></em>baz</p> "###, r###"Emphasis and strong emphasis (414)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo******bar*********baz -"###, - DANGER - ), + micromark_with_options(r###"foo******bar*********baz +"###, DANGER), r###"<p>foo<strong><strong><strong>bar</strong></strong></strong>***baz</p> "###, r###"Emphasis and strong emphasis (415)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo **bar *baz* bim** bop* -"###, - DANGER - ), + micromark_with_options(r###"*foo **bar *baz* bim** bop* +"###, DANGER), r###"<p><em>foo <strong>bar <em>baz</em> bim</strong> bop</em></p> "###, r###"Emphasis and strong emphasis (416)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo [*bar*](/url)* -"###, - DANGER - ), + micromark_with_options(r###"*foo [*bar*](/url)* +"###, DANGER), r###"<p><em>foo <a href="/url"><em>bar</em></a></em></p> "###, r###"Emphasis and strong emphasis (417)"### - ); +); assert_eq!( - micromark_with_options( - r###"** is not an empty emphasis -"###, - DANGER - ), + micromark_with_options(r###"** is not an empty emphasis +"###, DANGER), r###"<p>** is not an empty emphasis</p> "###, r###"Emphasis and strong emphasis (418)"### - ); +); assert_eq!( - micromark_with_options( - r###"**** is not an empty strong emphasis -"###, - DANGER - ), + micromark_with_options(r###"**** is not an empty strong emphasis +"###, DANGER), r###"<p>**** is not an empty strong emphasis</p> "###, r###"Emphasis and strong emphasis (419)"### - ); +); assert_eq!( - micromark_with_options( - r###"**foo [bar](/url)** -"###, - DANGER - ), + micromark_with_options(r###"**foo [bar](/url)** +"###, DANGER), r###"<p><strong>foo <a href="/url">bar</a></strong></p> "###, r###"Emphasis and strong emphasis (420)"### - ); +); assert_eq!( - micromark_with_options( - r###"**foo + micromark_with_options(r###"**foo bar** -"###, - DANGER - ), +"###, DANGER), r###"<p><strong>foo bar</strong></p> "###, r###"Emphasis and strong emphasis (421)"### - ); +); assert_eq!( - micromark_with_options( - r###"__foo _bar_ baz__ -"###, - DANGER - ), + micromark_with_options(r###"__foo _bar_ baz__ +"###, DANGER), r###"<p><strong>foo <em>bar</em> baz</strong></p> "###, r###"Emphasis and strong emphasis (422)"### - ); +); assert_eq!( - micromark_with_options( - r###"__foo __bar__ baz__ -"###, - DANGER - ), + micromark_with_options(r###"__foo __bar__ baz__ +"###, DANGER), r###"<p><strong>foo <strong>bar</strong> baz</strong></p> "###, r###"Emphasis and strong emphasis (423)"### - ); +); assert_eq!( - micromark_with_options( - r###"____foo__ bar__ -"###, - DANGER - ), + micromark_with_options(r###"____foo__ bar__ +"###, DANGER), r###"<p><strong><strong>foo</strong> bar</strong></p> "###, r###"Emphasis and strong emphasis (424)"### - ); +); assert_eq!( - micromark_with_options( - r###"**foo **bar**** -"###, - DANGER - ), + micromark_with_options(r###"**foo **bar**** +"###, DANGER), r###"<p><strong>foo <strong>bar</strong></strong></p> "###, r###"Emphasis and strong emphasis (425)"### - ); +); assert_eq!( - micromark_with_options( - r###"**foo *bar* baz** -"###, - DANGER - ), + micromark_with_options(r###"**foo *bar* baz** +"###, DANGER), r###"<p><strong>foo <em>bar</em> baz</strong></p> "###, r###"Emphasis and strong emphasis (426)"### - ); +); assert_eq!( - micromark_with_options( - r###"**foo*bar*baz** -"###, - DANGER - ), + micromark_with_options(r###"**foo*bar*baz** +"###, DANGER), r###"<p><strong>foo<em>bar</em>baz</strong></p> "###, r###"Emphasis and strong emphasis (427)"### - ); +); assert_eq!( - micromark_with_options( - r###"***foo* bar** -"###, - DANGER - ), + micromark_with_options(r###"***foo* bar** +"###, DANGER), r###"<p><strong><em>foo</em> bar</strong></p> "###, r###"Emphasis and strong emphasis (428)"### - ); +); assert_eq!( - micromark_with_options( - r###"**foo *bar*** -"###, - DANGER - ), + micromark_with_options(r###"**foo *bar*** +"###, DANGER), r###"<p><strong>foo <em>bar</em></strong></p> "###, r###"Emphasis and strong emphasis (429)"### - ); +); assert_eq!( - micromark_with_options( - r###"**foo *bar **baz** + micromark_with_options(r###"**foo *bar **baz** bim* bop** -"###, - DANGER - ), +"###, DANGER), r###"<p><strong>foo <em>bar <strong>baz</strong> bim</em> bop</strong></p> "###, r###"Emphasis and strong emphasis (430)"### - ); +); assert_eq!( - micromark_with_options( - r###"**foo [*bar*](/url)** -"###, - DANGER - ), + micromark_with_options(r###"**foo [*bar*](/url)** +"###, DANGER), r###"<p><strong>foo <a href="/url"><em>bar</em></a></strong></p> "###, r###"Emphasis and strong emphasis (431)"### - ); +); assert_eq!( - micromark_with_options( - r###"__ is not an empty emphasis -"###, - DANGER - ), + micromark_with_options(r###"__ is not an empty emphasis +"###, DANGER), r###"<p>__ is not an empty emphasis</p> "###, r###"Emphasis and strong emphasis (432)"### - ); +); assert_eq!( - micromark_with_options( - r###"____ is not an empty strong emphasis -"###, - DANGER - ), + micromark_with_options(r###"____ is not an empty strong emphasis +"###, DANGER), r###"<p>____ is not an empty strong emphasis</p> "###, r###"Emphasis and strong emphasis (433)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo *** -"###, - DANGER - ), + micromark_with_options(r###"foo *** +"###, DANGER), r###"<p>foo ***</p> "###, r###"Emphasis and strong emphasis (434)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo *\** -"###, - DANGER - ), + micromark_with_options(r###"foo *\** +"###, DANGER), r###"<p>foo <em>*</em></p> "###, r###"Emphasis and strong emphasis (435)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo *_* -"###, - DANGER - ), + micromark_with_options(r###"foo *_* +"###, DANGER), r###"<p>foo <em>_</em></p> "###, r###"Emphasis and strong emphasis (436)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo ***** -"###, - DANGER - ), + micromark_with_options(r###"foo ***** +"###, DANGER), r###"<p>foo *****</p> "###, r###"Emphasis and strong emphasis (437)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo **\*** -"###, - DANGER - ), + micromark_with_options(r###"foo **\*** +"###, DANGER), r###"<p>foo <strong>*</strong></p> "###, r###"Emphasis and strong emphasis (438)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo **_** -"###, - DANGER - ), + micromark_with_options(r###"foo **_** +"###, DANGER), r###"<p>foo <strong>_</strong></p> "###, r###"Emphasis and strong emphasis (439)"### - ); +); assert_eq!( - micromark_with_options( - r###"**foo* -"###, - DANGER - ), + micromark_with_options(r###"**foo* +"###, DANGER), r###"<p>*<em>foo</em></p> "###, r###"Emphasis and strong emphasis (440)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo** -"###, - DANGER - ), + micromark_with_options(r###"*foo** +"###, DANGER), r###"<p><em>foo</em>*</p> "###, r###"Emphasis and strong emphasis (441)"### - ); +); assert_eq!( - micromark_with_options( - r###"***foo** -"###, - DANGER - ), + micromark_with_options(r###"***foo** +"###, DANGER), r###"<p>*<strong>foo</strong></p> "###, r###"Emphasis and strong emphasis (442)"### - ); +); assert_eq!( - micromark_with_options( - r###"****foo* -"###, - DANGER - ), + micromark_with_options(r###"****foo* +"###, DANGER), r###"<p>***<em>foo</em></p> "###, r###"Emphasis and strong emphasis (443)"### - ); +); assert_eq!( - micromark_with_options( - r###"**foo*** -"###, - DANGER - ), + micromark_with_options(r###"**foo*** +"###, DANGER), r###"<p><strong>foo</strong>*</p> "###, r###"Emphasis and strong emphasis (444)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo**** -"###, - DANGER - ), + micromark_with_options(r###"*foo**** +"###, DANGER), r###"<p><em>foo</em>***</p> "###, r###"Emphasis and strong emphasis (445)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo ___ -"###, - DANGER - ), + micromark_with_options(r###"foo ___ +"###, DANGER), r###"<p>foo ___</p> "###, r###"Emphasis and strong emphasis (446)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo _\__ -"###, - DANGER - ), + micromark_with_options(r###"foo _\__ +"###, DANGER), r###"<p>foo <em>_</em></p> "###, r###"Emphasis and strong emphasis (447)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo _*_ -"###, - DANGER - ), + micromark_with_options(r###"foo _*_ +"###, DANGER), r###"<p>foo <em>*</em></p> "###, r###"Emphasis and strong emphasis (448)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo _____ -"###, - DANGER - ), + micromark_with_options(r###"foo _____ +"###, DANGER), r###"<p>foo _____</p> "###, r###"Emphasis and strong emphasis (449)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo __\___ -"###, - DANGER - ), + micromark_with_options(r###"foo __\___ +"###, DANGER), r###"<p>foo <strong>_</strong></p> "###, r###"Emphasis and strong emphasis (450)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo __*__ -"###, - DANGER - ), + micromark_with_options(r###"foo __*__ +"###, DANGER), r###"<p>foo <strong>*</strong></p> "###, r###"Emphasis and strong emphasis (451)"### - ); +); assert_eq!( - micromark_with_options( - r###"__foo_ -"###, - DANGER - ), + micromark_with_options(r###"__foo_ +"###, DANGER), r###"<p>_<em>foo</em></p> "###, r###"Emphasis and strong emphasis (452)"### - ); +); assert_eq!( - micromark_with_options( - r###"_foo__ -"###, - DANGER - ), + micromark_with_options(r###"_foo__ +"###, DANGER), r###"<p><em>foo</em>_</p> "###, r###"Emphasis and strong emphasis (453)"### - ); +); assert_eq!( - micromark_with_options( - r###"___foo__ -"###, - DANGER - ), + micromark_with_options(r###"___foo__ +"###, DANGER), r###"<p>_<strong>foo</strong></p> "###, r###"Emphasis and strong emphasis (454)"### - ); +); assert_eq!( - micromark_with_options( - r###"____foo_ -"###, - DANGER - ), + micromark_with_options(r###"____foo_ +"###, DANGER), r###"<p>___<em>foo</em></p> "###, r###"Emphasis and strong emphasis (455)"### - ); +); assert_eq!( - micromark_with_options( - r###"__foo___ -"###, - DANGER - ), + micromark_with_options(r###"__foo___ +"###, DANGER), r###"<p><strong>foo</strong>_</p> "###, r###"Emphasis and strong emphasis (456)"### - ); +); assert_eq!( - micromark_with_options( - r###"_foo____ -"###, - DANGER - ), + micromark_with_options(r###"_foo____ +"###, DANGER), r###"<p><em>foo</em>___</p> "###, r###"Emphasis and strong emphasis (457)"### - ); +); assert_eq!( - micromark_with_options( - r###"**foo** -"###, - DANGER - ), + micromark_with_options(r###"**foo** +"###, DANGER), r###"<p><strong>foo</strong></p> "###, r###"Emphasis and strong emphasis (458)"### - ); +); assert_eq!( - micromark_with_options( - r###"*_foo_* -"###, - DANGER - ), + micromark_with_options(r###"*_foo_* +"###, DANGER), r###"<p><em><em>foo</em></em></p> "###, r###"Emphasis and strong emphasis (459)"### - ); +); assert_eq!( - micromark_with_options( - r###"__foo__ -"###, - DANGER - ), + micromark_with_options(r###"__foo__ +"###, DANGER), r###"<p><strong>foo</strong></p> "###, r###"Emphasis and strong emphasis (460)"### - ); +); assert_eq!( - micromark_with_options( - r###"_*foo*_ -"###, - DANGER - ), + micromark_with_options(r###"_*foo*_ +"###, DANGER), r###"<p><em><em>foo</em></em></p> "###, r###"Emphasis and strong emphasis (461)"### - ); +); assert_eq!( - micromark_with_options( - r###"****foo**** -"###, - DANGER - ), + micromark_with_options(r###"****foo**** +"###, DANGER), r###"<p><strong><strong>foo</strong></strong></p> "###, r###"Emphasis and strong emphasis (462)"### - ); +); assert_eq!( - micromark_with_options( - r###"____foo____ -"###, - DANGER - ), + micromark_with_options(r###"____foo____ +"###, DANGER), r###"<p><strong><strong>foo</strong></strong></p> "###, r###"Emphasis and strong emphasis (463)"### - ); +); assert_eq!( - micromark_with_options( - r###"******foo****** -"###, - DANGER - ), + micromark_with_options(r###"******foo****** +"###, DANGER), r###"<p><strong><strong><strong>foo</strong></strong></strong></p> "###, r###"Emphasis and strong emphasis (464)"### - ); +); assert_eq!( - micromark_with_options( - r###"***foo*** -"###, - DANGER - ), + micromark_with_options(r###"***foo*** +"###, DANGER), r###"<p><em><strong>foo</strong></em></p> "###, r###"Emphasis and strong emphasis (465)"### - ); +); assert_eq!( - micromark_with_options( - r###"_____foo_____ -"###, - DANGER - ), + micromark_with_options(r###"_____foo_____ +"###, DANGER), r###"<p><em><strong><strong>foo</strong></strong></em></p> "###, r###"Emphasis and strong emphasis (466)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo _bar* baz_ -"###, - DANGER - ), + micromark_with_options(r###"*foo _bar* baz_ +"###, DANGER), r###"<p><em>foo _bar</em> baz_</p> "###, r###"Emphasis and strong emphasis (467)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo __bar *baz bim__ bam* -"###, - DANGER - ), + micromark_with_options(r###"*foo __bar *baz bim__ bam* +"###, DANGER), r###"<p><em>foo <strong>bar *baz bim</strong> bam</em></p> "###, r###"Emphasis and strong emphasis (468)"### - ); +); assert_eq!( - micromark_with_options( - r###"**foo **bar baz** -"###, - DANGER - ), + micromark_with_options(r###"**foo **bar baz** +"###, DANGER), r###"<p>**foo <strong>bar baz</strong></p> "###, r###"Emphasis and strong emphasis (469)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo *bar baz* -"###, - DANGER - ), + micromark_with_options(r###"*foo *bar baz* +"###, DANGER), r###"<p>*foo <em>bar baz</em></p> "###, r###"Emphasis and strong emphasis (470)"### - ); +); assert_eq!( - micromark_with_options( - r###"*[bar*](/url) -"###, - DANGER - ), + micromark_with_options(r###"*[bar*](/url) +"###, DANGER), r###"<p>*<a href="/url">bar*</a></p> "###, r###"Emphasis and strong emphasis (471)"### - ); +); assert_eq!( - micromark_with_options( - r###"_foo [bar_](/url) -"###, - DANGER - ), + micromark_with_options(r###"_foo [bar_](/url) +"###, DANGER), r###"<p>_foo <a href="/url">bar_</a></p> "###, r###"Emphasis and strong emphasis (472)"### - ); +); assert_eq!( - micromark_with_options( - r###"*<img src="foo" title="*"/> -"###, - DANGER - ), + micromark_with_options(r###"*<img src="foo" title="*"/> +"###, DANGER), r###"<p>*<img src="foo" title="*"/></p> "###, r###"Emphasis and strong emphasis (473)"### - ); +); assert_eq!( - micromark_with_options( - r###"**<a href="**"> -"###, - DANGER - ), + micromark_with_options(r###"**<a href="**"> +"###, DANGER), r###"<p>**<a href="**"></p> "###, r###"Emphasis and strong emphasis (474)"### - ); +); assert_eq!( - micromark_with_options( - r###"__<a href="__"> -"###, - DANGER - ), + micromark_with_options(r###"__<a href="__"> +"###, DANGER), r###"<p>__<a href="__"></p> "###, r###"Emphasis and strong emphasis (475)"### - ); +); assert_eq!( - micromark_with_options( - r###"*a `*`* -"###, - DANGER - ), + micromark_with_options(r###"*a `*`* +"###, DANGER), r###"<p><em>a <code>*</code></em></p> "###, r###"Emphasis and strong emphasis (476)"### - ); +); assert_eq!( - micromark_with_options( - r###"_a `_`_ -"###, - DANGER - ), + micromark_with_options(r###"_a `_`_ +"###, DANGER), r###"<p><em>a <code>_</code></em></p> "###, r###"Emphasis and strong emphasis (477)"### - ); +); assert_eq!( - micromark_with_options( - r###"**a<http://foo.bar/?q=**> -"###, - DANGER - ), + micromark_with_options(r###"**a<http://foo.bar/?q=**> +"###, DANGER), r###"<p>**a<a href="http://foo.bar/?q=**">http://foo.bar/?q=**</a></p> "###, r###"Emphasis and strong emphasis (478)"### - ); +); assert_eq!( - micromark_with_options( - r###"__a<http://foo.bar/?q=__> -"###, - DANGER - ), + micromark_with_options(r###"__a<http://foo.bar/?q=__> +"###, DANGER), r###"<p>__a<a href="http://foo.bar/?q=__">http://foo.bar/?q=__</a></p> "###, r###"Emphasis and strong emphasis (479)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](/uri "title") -"###, - DANGER - ), + micromark_with_options(r###"[link](/uri "title") +"###, DANGER), r###"<p><a href="/uri" title="title">link</a></p> "###, r###"Links (480)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](/uri) -"###, - DANGER - ), + micromark_with_options(r###"[link](/uri) +"###, DANGER), r###"<p><a href="/uri">link</a></p> "###, r###"Links (481)"### - ); +); assert_eq!( - micromark_with_options( - r###"[](./target.md) -"###, - DANGER - ), + micromark_with_options(r###"[](./target.md) +"###, DANGER), r###"<p><a href="./target.md"></a></p> "###, r###"Links (482)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link]() -"###, - DANGER - ), + micromark_with_options(r###"[link]() +"###, DANGER), r###"<p><a href="">link</a></p> "###, r###"Links (483)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](<>) -"###, - DANGER - ), + micromark_with_options(r###"[link](<>) +"###, DANGER), r###"<p><a href="">link</a></p> "###, r###"Links (484)"### - ); +); assert_eq!( - micromark_with_options( - r###"[]() -"###, - DANGER - ), + micromark_with_options(r###"[]() +"###, DANGER), r###"<p><a href=""></a></p> "###, r###"Links (485)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](/my uri) -"###, - DANGER - ), + micromark_with_options(r###"[link](/my uri) +"###, DANGER), r###"<p>[link](/my uri)</p> "###, r###"Links (486)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](</my uri>) -"###, - DANGER - ), + micromark_with_options(r###"[link](</my uri>) +"###, DANGER), r###"<p><a href="/my%20uri">link</a></p> "###, r###"Links (487)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](foo + micromark_with_options(r###"[link](foo bar) -"###, - DANGER - ), +"###, DANGER), r###"<p>[link](foo bar)</p> "###, r###"Links (488)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](<foo + micromark_with_options(r###"[link](<foo bar>) -"###, - DANGER - ), +"###, DANGER), r###"<p>[link](<foo bar>)</p> "###, r###"Links (489)"### - ); +); assert_eq!( - micromark_with_options( - r###"[a](<b)c>) -"###, - DANGER - ), + micromark_with_options(r###"[a](<b)c>) +"###, DANGER), r###"<p><a href="b)c">a</a></p> "###, r###"Links (490)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](<foo\>) -"###, - DANGER - ), + micromark_with_options(r###"[link](<foo\>) +"###, DANGER), r###"<p>[link](<foo>)</p> "###, r###"Links (491)"### - ); +); assert_eq!( - micromark_with_options( - r###"[a](<b)c + micromark_with_options(r###"[a](<b)c [a](<b)c> [a](<b>c) -"###, - DANGER - ), +"###, DANGER), r###"<p>[a](<b)c [a](<b)c> [a](<b>c)</p> "###, r###"Links (492)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](\(foo\)) -"###, - DANGER - ), + micromark_with_options(r###"[link](\(foo\)) +"###, DANGER), r###"<p><a href="(foo)">link</a></p> "###, r###"Links (493)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](foo(and(bar))) -"###, - DANGER - ), + micromark_with_options(r###"[link](foo(and(bar))) +"###, DANGER), r###"<p><a href="foo(and(bar))">link</a></p> "###, r###"Links (494)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](foo(and(bar)) -"###, - DANGER - ), + micromark_with_options(r###"[link](foo(and(bar)) +"###, DANGER), r###"<p>[link](foo(and(bar))</p> "###, r###"Links (495)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](foo\(and\(bar\)) -"###, - DANGER - ), + micromark_with_options(r###"[link](foo\(and\(bar\)) +"###, DANGER), r###"<p><a href="foo(and(bar)">link</a></p> "###, r###"Links (496)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](<foo(and(bar)>) -"###, - DANGER - ), + micromark_with_options(r###"[link](<foo(and(bar)>) +"###, DANGER), r###"<p><a href="foo(and(bar)">link</a></p> "###, r###"Links (497)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](foo\)\:) -"###, - DANGER - ), + micromark_with_options(r###"[link](foo\)\:) +"###, DANGER), r###"<p><a href="foo):">link</a></p> "###, r###"Links (498)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](#fragment) + micromark_with_options(r###"[link](#fragment) [link](http://example.com#fragment) [link](http://example.com?foo=3#frag) -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="#fragment">link</a></p> <p><a href="http://example.com#fragment">link</a></p> <p><a href="http://example.com?foo=3#frag">link</a></p> "###, r###"Links (499)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](foo\bar) -"###, - DANGER - ), + micromark_with_options(r###"[link](foo\bar) +"###, DANGER), r###"<p><a href="foo%5Cbar">link</a></p> "###, r###"Links (500)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](foo%20bä) -"###, - DANGER - ), + micromark_with_options(r###"[link](foo%20bä) +"###, DANGER), r###"<p><a href="foo%20b%C3%A4">link</a></p> "###, r###"Links (501)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link]("title") -"###, - DANGER - ), + micromark_with_options(r###"[link]("title") +"###, DANGER), r###"<p><a href="%22title%22">link</a></p> "###, r###"Links (502)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](/url "title") + micromark_with_options(r###"[link](/url "title") [link](/url 'title') [link](/url (title)) -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url" title="title">link</a> <a href="/url" title="title">link</a> <a href="/url" title="title">link</a></p> "###, r###"Links (503)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](/url "title \""") -"###, - DANGER - ), + micromark_with_options(r###"[link](/url "title \""") +"###, DANGER), r###"<p><a href="/url" title="title """>link</a></p> "###, r###"Links (504)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](/url "title") -"###, - DANGER - ), + micromark_with_options(r###"[link](/url "title") +"###, DANGER), r###"<p><a href="/url%C2%A0%22title%22">link</a></p> "###, r###"Links (505)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](/url "title "and" title") -"###, - DANGER - ), + micromark_with_options(r###"[link](/url "title "and" title") +"###, DANGER), r###"<p>[link](/url "title "and" title")</p> "###, r###"Links (506)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link](/url 'title "and" title') -"###, - DANGER - ), + micromark_with_options(r###"[link](/url 'title "and" title') +"###, DANGER), r###"<p><a href="/url" title="title "and" title">link</a></p> "###, r###"Links (507)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link]( /uri + micromark_with_options(r###"[link]( /uri "title" ) -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/uri" title="title">link</a></p> "###, r###"Links (508)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link] (/uri) -"###, - DANGER - ), + micromark_with_options(r###"[link] (/uri) +"###, DANGER), r###"<p>[link] (/uri)</p> "###, r###"Links (509)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link [foo [bar]]](/uri) -"###, - DANGER - ), + micromark_with_options(r###"[link [foo [bar]]](/uri) +"###, DANGER), r###"<p><a href="/uri">link [foo [bar]]</a></p> "###, r###"Links (510)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link] bar](/uri) -"###, - DANGER - ), + micromark_with_options(r###"[link] bar](/uri) +"###, DANGER), r###"<p>[link] bar](/uri)</p> "###, r###"Links (511)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link [bar](/uri) -"###, - DANGER - ), + micromark_with_options(r###"[link [bar](/uri) +"###, DANGER), r###"<p>[link <a href="/uri">bar</a></p> "###, r###"Links (512)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link \[bar](/uri) -"###, - DANGER - ), + micromark_with_options(r###"[link \[bar](/uri) +"###, DANGER), r###"<p><a href="/uri">link [bar</a></p> "###, r###"Links (513)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link *foo **bar** `#`*](/uri) -"###, - DANGER - ), + micromark_with_options(r###"[link *foo **bar** `#`*](/uri) +"###, DANGER), r###"<p><a href="/uri">link <em>foo <strong>bar</strong> <code>#</code></em></a></p> "###, r###"Links (514)"### - ); +); assert_eq!( - micromark_with_options( - r###"[![moon](moon.jpg)](/uri) -"###, - DANGER - ), + micromark_with_options(r###"[![moon](moon.jpg)](/uri) +"###, DANGER), r###"<p><a href="/uri"><img src="moon.jpg" alt="moon" /></a></p> "###, r###"Links (515)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo [bar](/uri)](/uri) -"###, - DANGER - ), + micromark_with_options(r###"[foo [bar](/uri)](/uri) +"###, DANGER), r###"<p>[foo <a href="/uri">bar</a>](/uri)</p> "###, r###"Links (516)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo *[bar [baz](/uri)](/uri)*](/uri) -"###, - DANGER - ), + micromark_with_options(r###"[foo *[bar [baz](/uri)](/uri)*](/uri) +"###, DANGER), r###"<p>[foo <em>[bar <a href="/uri">baz</a>](/uri)</em>](/uri)</p> "###, r###"Links (517)"### - ); +); assert_eq!( - micromark_with_options( - r###"![[[foo](uri1)](uri2)](uri3) -"###, - DANGER - ), + micromark_with_options(r###"![[[foo](uri1)](uri2)](uri3) +"###, DANGER), r###"<p><img src="uri3" alt="[foo](uri2)" /></p> "###, r###"Links (518)"### - ); +); assert_eq!( - micromark_with_options( - r###"*[foo*](/uri) -"###, - DANGER - ), + micromark_with_options(r###"*[foo*](/uri) +"###, DANGER), r###"<p>*<a href="/uri">foo*</a></p> "###, r###"Links (519)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo *bar](baz*) -"###, - DANGER - ), + micromark_with_options(r###"[foo *bar](baz*) +"###, DANGER), r###"<p><a href="baz*">foo *bar</a></p> "###, r###"Links (520)"### - ); +); assert_eq!( - micromark_with_options( - r###"*foo [bar* baz] -"###, - DANGER - ), + micromark_with_options(r###"*foo [bar* baz] +"###, DANGER), r###"<p><em>foo [bar</em> baz]</p> "###, r###"Links (521)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo <bar attr="](baz)"> -"###, - DANGER - ), + micromark_with_options(r###"[foo <bar attr="](baz)"> +"###, DANGER), r###"<p>[foo <bar attr="](baz)"></p> "###, r###"Links (522)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo`](/uri)` -"###, - DANGER - ), + micromark_with_options(r###"[foo`](/uri)` +"###, DANGER), r###"<p>[foo<code>](/uri)</code></p> "###, r###"Links (523)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo<http://example.com/?search=](uri)> -"###, - DANGER - ), + micromark_with_options(r###"[foo<http://example.com/?search=](uri)> +"###, DANGER), r###"<p>[foo<a href="http://example.com/?search=%5D(uri)">http://example.com/?search=](uri)</a></p> "###, r###"Links (524)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo][bar] + micromark_with_options(r###"[foo][bar] [bar]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url" title="title">foo</a></p> "###, r###"Links (525)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link [foo [bar]]][ref] + micromark_with_options(r###"[link [foo [bar]]][ref] [ref]: /uri -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/uri">link [foo [bar]]</a></p> "###, r###"Links (526)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link \[bar][ref] + micromark_with_options(r###"[link \[bar][ref] [ref]: /uri -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/uri">link [bar</a></p> "###, r###"Links (527)"### - ); +); assert_eq!( - micromark_with_options( - r###"[link *foo **bar** `#`*][ref] + micromark_with_options(r###"[link *foo **bar** `#`*][ref] [ref]: /uri -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/uri">link <em>foo <strong>bar</strong> <code>#</code></em></a></p> "###, r###"Links (528)"### - ); +); assert_eq!( - micromark_with_options( - r###"[![moon](moon.jpg)][ref] + micromark_with_options(r###"[![moon](moon.jpg)][ref] [ref]: /uri -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/uri"><img src="moon.jpg" alt="moon" /></a></p> "###, r###"Links (529)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo [bar](/uri)][ref] + micromark_with_options(r###"[foo [bar](/uri)][ref] [ref]: /uri -"###, - DANGER - ), +"###, DANGER), r###"<p>[foo <a href="/uri">bar</a>]<a href="/uri">ref</a></p> "###, r###"Links (530)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo *bar [baz][ref]*][ref] + micromark_with_options(r###"[foo *bar [baz][ref]*][ref] [ref]: /uri -"###, - DANGER - ), +"###, DANGER), r###"<p>[foo <em>bar <a href="/uri">baz</a></em>]<a href="/uri">ref</a></p> "###, r###"Links (531)"### - ); +); assert_eq!( - micromark_with_options( - r###"*[foo*][ref] + micromark_with_options(r###"*[foo*][ref] [ref]: /uri -"###, - DANGER - ), +"###, DANGER), r###"<p>*<a href="/uri">foo*</a></p> "###, r###"Links (532)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo *bar][ref]* + micromark_with_options(r###"[foo *bar][ref]* [ref]: /uri -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/uri">foo *bar</a>*</p> "###, r###"Links (533)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo <bar attr="][ref]"> + micromark_with_options(r###"[foo <bar attr="][ref]"> [ref]: /uri -"###, - DANGER - ), +"###, DANGER), r###"<p>[foo <bar attr="][ref]"></p> "###, r###"Links (534)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo`][ref]` + micromark_with_options(r###"[foo`][ref]` [ref]: /uri -"###, - DANGER - ), +"###, DANGER), r###"<p>[foo<code>][ref]</code></p> "###, r###"Links (535)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo<http://example.com/?search=][ref]> + micromark_with_options(r###"[foo<http://example.com/?search=][ref]> [ref]: /uri -"###, - DANGER - ), +"###, DANGER), r###"<p>[foo<a href="http://example.com/?search=%5D%5Bref%5D">http://example.com/?search=][ref]</a></p> "###, r###"Links (536)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo][BaR] + micromark_with_options(r###"[foo][BaR] [bar]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url" title="title">foo</a></p> "###, r###"Links (537)"### - ); +); - // To do: bug with unicode normalization. + // To do: Some unicode normalization bug. // assert_eq!( - // micromark_with_options( - // r###"[ẞ] + // micromark_with_options(r###"[ẞ] // [SS]: /url - // "###, - // DANGER - // ), + // "###, DANGER), // r###"<p><a href="/url">ẞ</a></p> // "###, // r###"Links (538)"### - // ); + // ); assert_eq!( - micromark_with_options( - r###"[Foo + micromark_with_options(r###"[Foo bar]: /url [Baz][Foo bar] -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url">Baz</a></p> "###, r###"Links (539)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo] [bar] + micromark_with_options(r###"[foo] [bar] [bar]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p>[foo] <a href="/url" title="title">bar</a></p> "###, r###"Links (540)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo] + micromark_with_options(r###"[foo] [bar] [bar]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p>[foo] <a href="/url" title="title">bar</a></p> "###, r###"Links (541)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo]: /url1 + micromark_with_options(r###"[foo]: /url1 [foo]: /url2 [bar][foo] -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url1">bar</a></p> "###, r###"Links (542)"### - ); +); assert_eq!( - micromark_with_options( - r###"[bar][foo\!] + micromark_with_options(r###"[bar][foo\!] [foo!]: /url -"###, - DANGER - ), +"###, DANGER), r###"<p>[bar][foo!]</p> "###, r###"Links (543)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo][ref[] + micromark_with_options(r###"[foo][ref[] [ref[]: /uri -"###, - DANGER - ), +"###, DANGER), r###"<p>[foo][ref[]</p> <p>[ref[]: /uri</p> "###, r###"Links (544)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo][ref[bar]] + micromark_with_options(r###"[foo][ref[bar]] [ref[bar]]: /uri -"###, - DANGER - ), +"###, DANGER), r###"<p>[foo][ref[bar]]</p> <p>[ref[bar]]: /uri</p> "###, r###"Links (545)"### - ); +); assert_eq!( - micromark_with_options( - r###"[[[foo]]] + micromark_with_options(r###"[[[foo]]] [[[foo]]]: /url -"###, - DANGER - ), +"###, DANGER), r###"<p>[[[foo]]]</p> <p>[[[foo]]]: /url</p> "###, r###"Links (546)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo][ref\[] + micromark_with_options(r###"[foo][ref\[] [ref\[]: /uri -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/uri">foo</a></p> "###, r###"Links (547)"### - ); +); assert_eq!( - micromark_with_options( - r###"[bar\\]: /uri + micromark_with_options(r###"[bar\\]: /uri [bar\\] -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/uri">bar\</a></p> "###, r###"Links (548)"### - ); +); assert_eq!( - micromark_with_options( - r###"[] + micromark_with_options(r###"[] []: /uri -"###, - DANGER - ), +"###, DANGER), r###"<p>[]</p> <p>[]: /uri</p> "###, r###"Links (549)"### - ); +); assert_eq!( - micromark_with_options( - r###"[ + micromark_with_options(r###"[ ] [ ]: /uri -"###, - DANGER - ), +"###, DANGER), r###"<p>[ ]</p> <p>[ ]: /uri</p> "###, r###"Links (550)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo][] + micromark_with_options(r###"[foo][] [foo]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url" title="title">foo</a></p> "###, r###"Links (551)"### - ); +); assert_eq!( - micromark_with_options( - r###"[*foo* bar][] + micromark_with_options(r###"[*foo* bar][] [*foo* bar]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url" title="title"><em>foo</em> bar</a></p> "###, r###"Links (552)"### - ); +); assert_eq!( - micromark_with_options( - r###"[Foo][] + micromark_with_options(r###"[Foo][] [foo]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url" title="title">Foo</a></p> "###, r###"Links (553)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo] + micromark_with_options(r###"[foo] [] [foo]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url" title="title">foo</a> []</p> "###, r###"Links (554)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo] + micromark_with_options(r###"[foo] [foo]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url" title="title">foo</a></p> "###, r###"Links (555)"### - ); +); assert_eq!( - micromark_with_options( - r###"[*foo* bar] + micromark_with_options(r###"[*foo* bar] [*foo* bar]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url" title="title"><em>foo</em> bar</a></p> "###, r###"Links (556)"### - ); +); assert_eq!( - micromark_with_options( - r###"[[*foo* bar]] + micromark_with_options(r###"[[*foo* bar]] [*foo* bar]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p>[<a href="/url" title="title"><em>foo</em> bar</a>]</p> "###, r###"Links (557)"### - ); +); assert_eq!( - micromark_with_options( - r###"[[bar [foo] + micromark_with_options(r###"[[bar [foo] [foo]: /url -"###, - DANGER - ), +"###, DANGER), r###"<p>[[bar <a href="/url">foo</a></p> "###, r###"Links (558)"### - ); +); assert_eq!( - micromark_with_options( - r###"[Foo] + micromark_with_options(r###"[Foo] [foo]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url" title="title">Foo</a></p> "###, r###"Links (559)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo] bar + micromark_with_options(r###"[foo] bar [foo]: /url -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url">foo</a> bar</p> "###, r###"Links (560)"### - ); +); assert_eq!( - micromark_with_options( - r###"\[foo] + micromark_with_options(r###"\[foo] [foo]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p>[foo]</p> "###, r###"Links (561)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo*]: /url + micromark_with_options(r###"[foo*]: /url *[foo*] -"###, - DANGER - ), +"###, DANGER), r###"<p>*<a href="/url">foo*</a></p> "###, r###"Links (562)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo][bar] + micromark_with_options(r###"[foo][bar] [foo]: /url1 [bar]: /url2 -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url2">foo</a></p> "###, r###"Links (563)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo][] + micromark_with_options(r###"[foo][] [foo]: /url1 -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url1">foo</a></p> "###, r###"Links (564)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo]() + micromark_with_options(r###"[foo]() [foo]: /url1 -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="">foo</a></p> "###, r###"Links (565)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo](not a link) + micromark_with_options(r###"[foo](not a link) [foo]: /url1 -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url1">foo</a>(not a link)</p> "###, r###"Links (566)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo][bar][baz] + micromark_with_options(r###"[foo][bar][baz] [baz]: /url -"###, - DANGER - ), +"###, DANGER), r###"<p>[foo]<a href="/url">bar</a></p> "###, r###"Links (567)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo][bar][baz] + micromark_with_options(r###"[foo][bar][baz] [baz]: /url1 [bar]: /url2 -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="/url2">foo</a><a href="/url1">baz</a></p> "###, r###"Links (568)"### - ); +); assert_eq!( - micromark_with_options( - r###"[foo][bar][baz] + micromark_with_options(r###"[foo][bar][baz] [baz]: /url1 [foo]: /url2 -"###, - DANGER - ), +"###, DANGER), r###"<p>[foo]<a href="/url1">bar</a></p> "###, r###"Links (569)"### - ); +); assert_eq!( - micromark_with_options( - r###"![foo](/url "title") -"###, - DANGER - ), + micromark_with_options(r###"![foo](/url "title") +"###, DANGER), r###"<p><img src="/url" alt="foo" title="title" /></p> "###, r###"Images (570)"### - ); +); assert_eq!( - micromark_with_options( - r###"![foo *bar*] + micromark_with_options(r###"![foo *bar*] [foo *bar*]: train.jpg "train & tracks" -"###, - DANGER - ), +"###, DANGER), r###"<p><img src="train.jpg" alt="foo bar" title="train & tracks" /></p> "###, r###"Images (571)"### - ); +); assert_eq!( - micromark_with_options( - r###"![foo ![bar](/url)](/url2) -"###, - DANGER - ), + micromark_with_options(r###"![foo ![bar](/url)](/url2) +"###, DANGER), r###"<p><img src="/url2" alt="foo bar" /></p> "###, r###"Images (572)"### - ); +); assert_eq!( - micromark_with_options( - r###"![foo [bar](/url)](/url2) -"###, - DANGER - ), + micromark_with_options(r###"![foo [bar](/url)](/url2) +"###, DANGER), r###"<p><img src="/url2" alt="foo bar" /></p> "###, r###"Images (573)"### - ); +); assert_eq!( - micromark_with_options( - r###"![foo *bar*][] + micromark_with_options(r###"![foo *bar*][] [foo *bar*]: train.jpg "train & tracks" -"###, - DANGER - ), +"###, DANGER), r###"<p><img src="train.jpg" alt="foo bar" title="train & tracks" /></p> "###, r###"Images (574)"### - ); +); assert_eq!( - micromark_with_options( - r###"![foo *bar*][foobar] + micromark_with_options(r###"![foo *bar*][foobar] [FOOBAR]: train.jpg "train & tracks" -"###, - DANGER - ), +"###, DANGER), r###"<p><img src="train.jpg" alt="foo bar" title="train & tracks" /></p> "###, r###"Images (575)"### - ); +); assert_eq!( - micromark_with_options( - r###"![foo](train.jpg) -"###, - DANGER - ), + micromark_with_options(r###"![foo](train.jpg) +"###, DANGER), r###"<p><img src="train.jpg" alt="foo" /></p> "###, r###"Images (576)"### - ); +); assert_eq!( - micromark_with_options( - r###"My ![foo bar](/path/to/train.jpg "title" ) -"###, - DANGER - ), + micromark_with_options(r###"My ![foo bar](/path/to/train.jpg "title" ) +"###, DANGER), r###"<p>My <img src="/path/to/train.jpg" alt="foo bar" title="title" /></p> "###, r###"Images (577)"### - ); +); assert_eq!( - micromark_with_options( - r###"![foo](<url>) -"###, - DANGER - ), + micromark_with_options(r###"![foo](<url>) +"###, DANGER), r###"<p><img src="url" alt="foo" /></p> "###, r###"Images (578)"### - ); +); assert_eq!( - micromark_with_options( - r###"![](/url) -"###, - DANGER - ), + micromark_with_options(r###"![](/url) +"###, DANGER), r###"<p><img src="/url" alt="" /></p> "###, r###"Images (579)"### - ); +); assert_eq!( - micromark_with_options( - r###"![foo][bar] + micromark_with_options(r###"![foo][bar] [bar]: /url -"###, - DANGER - ), +"###, DANGER), r###"<p><img src="/url" alt="foo" /></p> "###, r###"Images (580)"### - ); +); assert_eq!( - micromark_with_options( - r###"![foo][bar] + micromark_with_options(r###"![foo][bar] [BAR]: /url -"###, - DANGER - ), +"###, DANGER), r###"<p><img src="/url" alt="foo" /></p> "###, r###"Images (581)"### - ); +); assert_eq!( - micromark_with_options( - r###"![foo][] + micromark_with_options(r###"![foo][] [foo]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p><img src="/url" alt="foo" title="title" /></p> "###, r###"Images (582)"### - ); +); assert_eq!( - micromark_with_options( - r###"![*foo* bar][] + micromark_with_options(r###"![*foo* bar][] [*foo* bar]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p><img src="/url" alt="foo bar" title="title" /></p> "###, r###"Images (583)"### - ); +); assert_eq!( - micromark_with_options( - r###"![Foo][] + micromark_with_options(r###"![Foo][] [foo]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p><img src="/url" alt="Foo" title="title" /></p> "###, r###"Images (584)"### - ); +); assert_eq!( - micromark_with_options( - r###"![foo] + micromark_with_options(r###"![foo] [] [foo]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p><img src="/url" alt="foo" title="title" /> []</p> "###, r###"Images (585)"### - ); +); assert_eq!( - micromark_with_options( - r###"![foo] + micromark_with_options(r###"![foo] [foo]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p><img src="/url" alt="foo" title="title" /></p> "###, r###"Images (586)"### - ); +); assert_eq!( - micromark_with_options( - r###"![*foo* bar] + micromark_with_options(r###"![*foo* bar] [*foo* bar]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p><img src="/url" alt="foo bar" title="title" /></p> "###, r###"Images (587)"### - ); +); assert_eq!( - micromark_with_options( - r###"![[foo]] + micromark_with_options(r###"![[foo]] [[foo]]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p>![[foo]]</p> <p>[[foo]]: /url "title"</p> "###, r###"Images (588)"### - ); +); assert_eq!( - micromark_with_options( - r###"![Foo] + micromark_with_options(r###"![Foo] [foo]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p><img src="/url" alt="Foo" title="title" /></p> "###, r###"Images (589)"### - ); +); assert_eq!( - micromark_with_options( - r###"!\[foo] + micromark_with_options(r###"!\[foo] [foo]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p>![foo]</p> "###, r###"Images (590)"### - ); +); assert_eq!( - micromark_with_options( - r###"\![foo] + micromark_with_options(r###"\![foo] [foo]: /url "title" -"###, - DANGER - ), +"###, DANGER), r###"<p>!<a href="/url" title="title">foo</a></p> "###, r###"Images (591)"### - ); +); assert_eq!( - micromark_with_options( - r###"<http://foo.bar.baz> -"###, - DANGER - ), + micromark_with_options(r###"<http://foo.bar.baz> +"###, DANGER), r###"<p><a href="http://foo.bar.baz">http://foo.bar.baz</a></p> "###, r###"Autolinks (592)"### - ); +); assert_eq!( - micromark_with_options( - r###"<http://foo.bar.baz/test?q=hello&id=22&boolean> -"###, - DANGER - ), + micromark_with_options(r###"<http://foo.bar.baz/test?q=hello&id=22&boolean> +"###, DANGER), r###"<p><a href="http://foo.bar.baz/test?q=hello&id=22&boolean">http://foo.bar.baz/test?q=hello&id=22&boolean</a></p> "###, r###"Autolinks (593)"### - ); +); assert_eq!( - micromark_with_options( - r###"<irc://foo.bar:2233/baz> -"###, - DANGER - ), + micromark_with_options(r###"<irc://foo.bar:2233/baz> +"###, DANGER), r###"<p><a href="irc://foo.bar:2233/baz">irc://foo.bar:2233/baz</a></p> "###, r###"Autolinks (594)"### - ); +); assert_eq!( - micromark_with_options( - r###"<MAILTO:FOO@BAR.BAZ> -"###, - DANGER - ), + micromark_with_options(r###"<MAILTO:FOO@BAR.BAZ> +"###, DANGER), r###"<p><a href="MAILTO:FOO@BAR.BAZ">MAILTO:FOO@BAR.BAZ</a></p> "###, r###"Autolinks (595)"### - ); +); assert_eq!( - micromark_with_options( - r###"<a+b+c:d> -"###, - DANGER - ), + micromark_with_options(r###"<a+b+c:d> +"###, DANGER), r###"<p><a href="a+b+c:d">a+b+c:d</a></p> "###, r###"Autolinks (596)"### - ); +); assert_eq!( - micromark_with_options( - r###"<made-up-scheme://foo,bar> -"###, - DANGER - ), + micromark_with_options(r###"<made-up-scheme://foo,bar> +"###, DANGER), r###"<p><a href="made-up-scheme://foo,bar">made-up-scheme://foo,bar</a></p> "###, r###"Autolinks (597)"### - ); +); assert_eq!( - micromark_with_options( - r###"<http://../> -"###, - DANGER - ), + micromark_with_options(r###"<http://../> +"###, DANGER), r###"<p><a href="http://../">http://../</a></p> "###, r###"Autolinks (598)"### - ); +); assert_eq!( - micromark_with_options( - r###"<localhost:5001/foo> -"###, - DANGER - ), + micromark_with_options(r###"<localhost:5001/foo> +"###, DANGER), r###"<p><a href="localhost:5001/foo">localhost:5001/foo</a></p> "###, r###"Autolinks (599)"### - ); +); assert_eq!( - micromark_with_options( - r###"<http://foo.bar/baz bim> -"###, - DANGER - ), + micromark_with_options(r###"<http://foo.bar/baz bim> +"###, DANGER), r###"<p><http://foo.bar/baz bim></p> "###, r###"Autolinks (600)"### - ); +); assert_eq!( - micromark_with_options( - r###"<http://example.com/\[\> -"###, - DANGER - ), + micromark_with_options(r###"<http://example.com/\[\> +"###, DANGER), r###"<p><a href="http://example.com/%5C%5B%5C">http://example.com/\[\</a></p> "###, r###"Autolinks (601)"### - ); +); assert_eq!( - micromark_with_options( - r###"<foo@bar.example.com> -"###, - DANGER - ), + micromark_with_options(r###"<foo@bar.example.com> +"###, DANGER), r###"<p><a href="mailto:foo@bar.example.com">foo@bar.example.com</a></p> "###, r###"Autolinks (602)"### - ); +); assert_eq!( - micromark_with_options( - r###"<foo+special@Bar.baz-bar0.com> -"###, - DANGER - ), + micromark_with_options(r###"<foo+special@Bar.baz-bar0.com> +"###, DANGER), r###"<p><a href="mailto:foo+special@Bar.baz-bar0.com">foo+special@Bar.baz-bar0.com</a></p> "###, r###"Autolinks (603)"### - ); +); assert_eq!( - micromark_with_options( - r###"<foo\+@bar.example.com> -"###, - DANGER - ), + micromark_with_options(r###"<foo\+@bar.example.com> +"###, DANGER), r###"<p><foo+@bar.example.com></p> "###, r###"Autolinks (604)"### - ); +); assert_eq!( - micromark_with_options( - r###"<> -"###, - DANGER - ), + micromark_with_options(r###"<> +"###, DANGER), r###"<p><></p> "###, r###"Autolinks (605)"### - ); +); assert_eq!( - micromark_with_options( - r###"< http://foo.bar > -"###, - DANGER - ), + micromark_with_options(r###"< http://foo.bar > +"###, DANGER), r###"<p>< http://foo.bar ></p> "###, r###"Autolinks (606)"### - ); +); assert_eq!( - micromark_with_options( - r###"<m:abc> -"###, - DANGER - ), + micromark_with_options(r###"<m:abc> +"###, DANGER), r###"<p><m:abc></p> "###, r###"Autolinks (607)"### - ); +); assert_eq!( - micromark_with_options( - r###"<foo.bar.baz> -"###, - DANGER - ), + micromark_with_options(r###"<foo.bar.baz> +"###, DANGER), r###"<p><foo.bar.baz></p> "###, r###"Autolinks (608)"### - ); +); assert_eq!( - micromark_with_options( - r###"http://example.com -"###, - DANGER - ), + micromark_with_options(r###"http://example.com +"###, DANGER), r###"<p>http://example.com</p> "###, r###"Autolinks (609)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo@bar.example.com -"###, - DANGER - ), + micromark_with_options(r###"foo@bar.example.com +"###, DANGER), r###"<p>foo@bar.example.com</p> "###, r###"Autolinks (610)"### - ); +); assert_eq!( - micromark_with_options( - r###"<a><bab><c2c> -"###, - DANGER - ), + micromark_with_options(r###"<a><bab><c2c> +"###, DANGER), r###"<p><a><bab><c2c></p> "###, r###"Raw HTML (611)"### - ); +); assert_eq!( - micromark_with_options( - r###"<a/><b2/> -"###, - DANGER - ), + micromark_with_options(r###"<a/><b2/> +"###, DANGER), r###"<p><a/><b2/></p> "###, r###"Raw HTML (612)"### - ); +); assert_eq!( - micromark_with_options( - r###"<a /><b2 + micromark_with_options(r###"<a /><b2 data="foo" > -"###, - DANGER - ), +"###, DANGER), r###"<p><a /><b2 data="foo" ></p> "###, r###"Raw HTML (613)"### - ); +); assert_eq!( - micromark_with_options( - r###"<a foo="bar" bam = 'baz <em>"</em>' + micromark_with_options(r###"<a foo="bar" bam = 'baz <em>"</em>' _boolean zoop:33=zoop:33 /> -"###, - DANGER - ), +"###, DANGER), r###"<p><a foo="bar" bam = 'baz <em>"</em>' _boolean zoop:33=zoop:33 /></p> "###, r###"Raw HTML (614)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo <responsive-image src="foo.jpg" /> -"###, - DANGER - ), + micromark_with_options(r###"Foo <responsive-image src="foo.jpg" /> +"###, DANGER), r###"<p>Foo <responsive-image src="foo.jpg" /></p> "###, r###"Raw HTML (615)"### - ); +); assert_eq!( - micromark_with_options( - r###"<33> <__> -"###, - DANGER - ), + micromark_with_options(r###"<33> <__> +"###, DANGER), r###"<p><33> <__></p> "###, r###"Raw HTML (616)"### - ); +); assert_eq!( - micromark_with_options( - r###"<a h*#ref="hi"> -"###, - DANGER - ), + micromark_with_options(r###"<a h*#ref="hi"> +"###, DANGER), r###"<p><a h*#ref="hi"></p> "###, r###"Raw HTML (617)"### - ); +); assert_eq!( - micromark_with_options( - r###"<a href="hi'> <a href=hi'> -"###, - DANGER - ), + micromark_with_options(r###"<a href="hi'> <a href=hi'> +"###, DANGER), r###"<p><a href="hi'> <a href=hi'></p> "###, r###"Raw HTML (618)"### - ); +); assert_eq!( - micromark_with_options( - r###"< a>< + micromark_with_options(r###"< a>< foo><bar/ > <foo bar=baz bim!bop /> -"###, - DANGER - ), +"###, DANGER), r###"<p>< a>< foo><bar/ > <foo bar=baz bim!bop /></p> "###, r###"Raw HTML (619)"### - ); +); assert_eq!( - micromark_with_options( - r###"<a href='bar'title=title> -"###, - DANGER - ), + micromark_with_options(r###"<a href='bar'title=title> +"###, DANGER), r###"<p><a href='bar'title=title></p> "###, r###"Raw HTML (620)"### - ); +); assert_eq!( - micromark_with_options( - r###"</a></foo > -"###, - DANGER - ), + micromark_with_options(r###"</a></foo > +"###, DANGER), r###"<p></a></foo ></p> "###, r###"Raw HTML (621)"### - ); +); assert_eq!( - micromark_with_options( - r###"</a href="foo"> -"###, - DANGER - ), + micromark_with_options(r###"</a href="foo"> +"###, DANGER), r###"<p></a href="foo"></p> "###, r###"Raw HTML (622)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo <!-- this is a + micromark_with_options(r###"foo <!-- this is a comment - with hyphen --> -"###, - DANGER - ), +"###, DANGER), r###"<p>foo <!-- this is a comment - with hyphen --></p> "###, r###"Raw HTML (623)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo <!-- not a comment -- two hyphens --> -"###, - DANGER - ), + micromark_with_options(r###"foo <!-- not a comment -- two hyphens --> +"###, DANGER), r###"<p>foo <!-- not a comment -- two hyphens --></p> "###, r###"Raw HTML (624)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo <!--> foo --> + micromark_with_options(r###"foo <!--> foo --> foo <!-- foo---> -"###, - DANGER - ), +"###, DANGER), r###"<p>foo <!--> foo --></p> <p>foo <!-- foo---></p> "###, r###"Raw HTML (625)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo <?php echo $a; ?> -"###, - DANGER - ), + micromark_with_options(r###"foo <?php echo $a; ?> +"###, DANGER), r###"<p>foo <?php echo $a; ?></p> "###, r###"Raw HTML (626)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo <!ELEMENT br EMPTY> -"###, - DANGER - ), + micromark_with_options(r###"foo <!ELEMENT br EMPTY> +"###, DANGER), r###"<p>foo <!ELEMENT br EMPTY></p> "###, r###"Raw HTML (627)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo <![CDATA[>&<]]> -"###, - DANGER - ), + micromark_with_options(r###"foo <![CDATA[>&<]]> +"###, DANGER), r###"<p>foo <![CDATA[>&<]]></p> "###, r###"Raw HTML (628)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo <a href="ö"> -"###, - DANGER - ), + micromark_with_options(r###"foo <a href="ö"> +"###, DANGER), r###"<p>foo <a href="ö"></p> "###, r###"Raw HTML (629)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo <a href="\*"> -"###, - DANGER - ), + micromark_with_options(r###"foo <a href="\*"> +"###, DANGER), r###"<p>foo <a href="\*"></p> "###, r###"Raw HTML (630)"### - ); +); assert_eq!( - micromark_with_options( - r###"<a href="\""> -"###, - DANGER - ), + micromark_with_options(r###"<a href="\""> +"###, DANGER), r###"<p><a href="""></p> "###, r###"Raw HTML (631)"### - ); - - // To do: bug generating this file. - // assert_eq!( - // micromark_with_options( - // r###"foo - // baz - // "###, - // DANGER - // ), - // r###"<p>foo<br /> - // baz</p> - // "###, - // r###"Hard line breaks (632)"### - // ); +); assert_eq!( - micromark_with_options( - r###"foo\ + micromark_with_options(r###"foo baz +"###, DANGER), + r###"<p>foo<br /> +baz</p> "###, - DANGER - ), + r###"Hard line breaks (632)"### +); + + assert_eq!( + micromark_with_options(r###"foo\ +baz +"###, DANGER), r###"<p>foo<br /> baz</p> "###, r###"Hard line breaks (633)"### - ); - - // To do: bug generating this file. - // assert_eq!( - // micromark_with_options( - // r###"foo - // baz - // "###, - // DANGER - // ), - // r###"<p>foo<br /> - // baz</p> - // "###, - // r###"Hard line breaks (634)"### - // ); +); - // To do: bug generating this file. - // assert_eq!( - // micromark_with_options( - // r###"foo - // bar - // "###, - // DANGER - // ), - // r###"<p>foo<br /> - // bar</p> - // "###, - // r###"Hard line breaks (635)"### - // ); + assert_eq!( + micromark_with_options(r###"foo +baz +"###, DANGER), + r###"<p>foo<br /> +baz</p> +"###, + r###"Hard line breaks (634)"### +); assert_eq!( - micromark_with_options( - r###"foo\ + micromark_with_options(r###"foo bar +"###, DANGER), + r###"<p>foo<br /> +bar</p> "###, - DANGER - ), + r###"Hard line breaks (635)"### +); + + assert_eq!( + micromark_with_options(r###"foo\ + bar +"###, DANGER), r###"<p>foo<br /> bar</p> "###, r###"Hard line breaks (636)"### - ); - - // To do: bug generating this file. - // assert_eq!( - // micromark_with_options( - // r###"*foo - // bar* - // "###, - // DANGER - // ), - // r###"<p><em>foo<br /> - // bar</em></p> - // "###, - // r###"Hard line breaks (637)"### - // ); +); assert_eq!( - micromark_with_options( - r###"*foo\ + micromark_with_options(r###"*foo bar* +"###, DANGER), + r###"<p><em>foo<br /> +bar</em></p> "###, - DANGER - ), + r###"Hard line breaks (637)"### +); + + assert_eq!( + micromark_with_options(r###"*foo\ +bar* +"###, DANGER), r###"<p><em>foo<br /> bar</em></p> "###, r###"Hard line breaks (638)"### - ); - - // To do: bug generating this file. - // assert_eq!( - // micromark_with_options( - // r###"`code - // span` - // "###, - // DANGER - // ), - // r###"<p><code>code span</code></p> - // "###, - // r###"Hard line breaks (639)"### - // ); +); assert_eq!( - micromark_with_options( - r###"`code\ + micromark_with_options(r###"`code span` +"###, DANGER), + r###"<p><code>code span</code></p> "###, - DANGER - ), + r###"Hard line breaks (639)"### +); + + assert_eq!( + micromark_with_options(r###"`code\ +span` +"###, DANGER), r###"<p><code>code\ span</code></p> "###, r###"Hard line breaks (640)"### - ); +); assert_eq!( - micromark_with_options( - r###"<a href="foo + micromark_with_options(r###"<a href="foo bar"> -"###, - DANGER - ), - r###"<p><a href="foo +"###, DANGER), + r###"<p><a href="foo bar"></p> "###, r###"Hard line breaks (641)"### - ); +); assert_eq!( - micromark_with_options( - r###"<a href="foo\ + micromark_with_options(r###"<a href="foo\ bar"> -"###, - DANGER - ), +"###, DANGER), r###"<p><a href="foo\ bar"></p> "###, r###"Hard line breaks (642)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo\ -"###, - DANGER - ), + micromark_with_options(r###"foo\ +"###, DANGER), r###"<p>foo\</p> "###, r###"Hard line breaks (643)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo -"###, - DANGER - ), + micromark_with_options(r###"foo +"###, DANGER), r###"<p>foo</p> "###, r###"Hard line breaks (644)"### - ); +); assert_eq!( - micromark_with_options( - r###"### foo\ -"###, - DANGER - ), + micromark_with_options(r###"### foo\ +"###, DANGER), r###"<h3>foo\</h3> "###, r###"Hard line breaks (645)"### - ); +); assert_eq!( - micromark_with_options( - r###"### foo -"###, - DANGER - ), + micromark_with_options(r###"### foo +"###, DANGER), r###"<h3>foo</h3> "###, r###"Hard line breaks (646)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo + micromark_with_options(r###"foo baz -"###, - DANGER - ), +"###, DANGER), r###"<p>foo baz</p> "###, r###"Soft line breaks (647)"### - ); +); assert_eq!( - micromark_with_options( - r###"foo + micromark_with_options(r###"foo baz -"###, - DANGER - ), +"###, DANGER), r###"<p>foo baz</p> "###, r###"Soft line breaks (648)"### - ); +); assert_eq!( - micromark_with_options( - r###"hello $.;'there -"###, - DANGER - ), + micromark_with_options(r###"hello $.;'there +"###, DANGER), r###"<p>hello $.;'there</p> "###, r###"Textual content (649)"### - ); +); assert_eq!( - micromark_with_options( - r###"Foo χρῆν -"###, - DANGER - ), + micromark_with_options(r###"Foo χρῆν +"###, DANGER), r###"<p>Foo χρῆν</p> "###, r###"Textual content (650)"### - ); +); assert_eq!( - micromark_with_options( - r###"Multiple spaces -"###, - DANGER - ), + micromark_with_options(r###"Multiple spaces +"###, DANGER), r###"<p>Multiple spaces</p> "###, r###"Textual content (651)"### - ); +); } |