diff options
Diffstat (limited to 'vendor/pulldown-cmark/tests/suite')
-rw-r--r-- | vendor/pulldown-cmark/tests/suite/footnotes.rs | 165 | ||||
-rw-r--r-- | vendor/pulldown-cmark/tests/suite/gfm_strikethrough.rs | 27 | ||||
-rw-r--r-- | vendor/pulldown-cmark/tests/suite/gfm_table.rs | 205 | ||||
-rw-r--r-- | vendor/pulldown-cmark/tests/suite/gfm_tasklist.rs | 39 | ||||
-rw-r--r-- | vendor/pulldown-cmark/tests/suite/heading_attrs.rs | 571 | ||||
-rw-r--r-- | vendor/pulldown-cmark/tests/suite/mod.rs | 14 | ||||
-rw-r--r-- | vendor/pulldown-cmark/tests/suite/regression.rs | 1021 | ||||
-rw-r--r-- | vendor/pulldown-cmark/tests/suite/smart_punct.rs | 201 | ||||
-rw-r--r-- | vendor/pulldown-cmark/tests/suite/spec.rs | 8490 | ||||
-rw-r--r-- | vendor/pulldown-cmark/tests/suite/table.rs | 205 |
10 files changed, 10938 insertions, 0 deletions
diff --git a/vendor/pulldown-cmark/tests/suite/footnotes.rs b/vendor/pulldown-cmark/tests/suite/footnotes.rs new file mode 100644 index 000000000..5e5c49bb7 --- /dev/null +++ b/vendor/pulldown-cmark/tests/suite/footnotes.rs @@ -0,0 +1,165 @@ +// This file is auto-generated by the build script +// Please, do not modify it manually + +use super::test_markdown_html; + +#[test] +fn footnotes_test_1() { + let original = r##"Lorem ipsum.[^a] + +[^a]: Cool. +"##; + let expected = r##"<p>Lorem ipsum.<sup class="footnote-reference"><a href="#a">1</a></sup></p> +<div class="footnote-definition" id="a"><sup class="footnote-definition-label">1</sup> +<p>Cool.</p> +</div> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn footnotes_test_2() { + let original = r##"> This is the song that never ends.\ +> Yes it goes on and on my friends.[^lambchops] +> +> [^lambchops]: <https://www.youtube.com/watch?v=0U2zJOryHKQ> +"##; + let expected = r##"<blockquote> +<p>This is the song that never ends.<br /> +Yes it goes on and on my friends.<sup class="footnote-reference"><a href="#lambchops">1</a></sup></p> +<div class="footnote-definition" id="lambchops"><sup class="footnote-definition-label">1</sup> +<p><a href="https://www.youtube.com/watch?v=0U2zJOryHKQ">https://www.youtube.com/watch?v=0U2zJOryHKQ</a></p> +</div> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn footnotes_test_3() { + let original = r##"Songs that simply loop are a popular way to annoy people. [^examples] + +[^examples]: + * [The song that never ends](https://www.youtube.com/watch?v=0U2zJOryHKQ) + * [I know a song that gets on everybody's nerves](https://www.youtube.com/watch?v=TehWI09qxls) + * [Ninety-nine bottles of beer on the wall](https://www.youtube.com/watch?v=qVjCag8XoHQ) +"##; + let expected = r##"<p>Songs that simply loop are a popular way to annoy people. <sup class="footnote-reference"><a href="#examples">1</a></sup></p> +<div class="footnote-definition" id="examples"><sup class="footnote-definition-label">1</sup> +<ul> +<li><a href="https://www.youtube.com/watch?v=0U2zJOryHKQ">The song that never ends</a></li> +<li><a href="https://www.youtube.com/watch?v=TehWI09qxls">I know a song that gets on everybody's nerves</a></li> +<li><a href="https://www.youtube.com/watch?v=qVjCag8XoHQ">Ninety-nine bottles of beer on the wall</a></li> +</ul> +</div> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn footnotes_test_4() { + let original = r##"[^lorem]: If heaven ever wishes to grant me a boon, it will be a total effacing of the results of a mere chance which fixed my eye on a certain stray piece of shelf-paper. It was nothing on which I would naturally have stumbled in the course of my daily round, for it was an old number of an Australian journal, the Sydney Bulletin for April 18, 1925. It had escaped even the cutting bureau which had at the time of its issuance been avidly collecting material for my uncle's research. + +I had largely given over my inquiries into what Professor Angell called the "Cthulhu Cult", and was visiting a learned friend in Paterson, New Jersey; the curator of a local museum and a mineralogist of note. Examining one day the reserve specimens roughly set on the storage shelves in a rear room of the museum, my eye was caught by an odd picture in one of the old papers spread beneath the stones. It was the Sydney Bulletin I have mentioned, for my friend had wide affiliations in all conceivable foreign parts; and the picture was a half-tone cut of a hideous stone image almost identical with that which Legrasse had found in the swamp. +"##; + let expected = r##"<div class="footnote-definition" id="lorem"><sup class="footnote-definition-label">1</sup> +<p>If heaven ever wishes to grant me a boon, it will be a total effacing of the results of a mere chance which fixed my eye on a certain stray piece of shelf-paper. It was nothing on which I would naturally have stumbled in the course of my daily round, for it was an old number of an Australian journal, the Sydney Bulletin for April 18, 1925. It had escaped even the cutting bureau which had at the time of its issuance been avidly collecting material for my uncle's research.</p> +</div> +<p>I had largely given over my inquiries into what Professor Angell called the "Cthulhu Cult", and was visiting a learned friend in Paterson, New Jersey; the curator of a local museum and a mineralogist of note. Examining one day the reserve specimens roughly set on the storage shelves in a rear room of the museum, my eye was caught by an odd picture in one of the old papers spread beneath the stones. It was the Sydney Bulletin I have mentioned, for my friend had wide affiliations in all conceivable foreign parts; and the picture was a half-tone cut of a hideous stone image almost identical with that which Legrasse had found in the swamp.</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn footnotes_test_5() { + let original = r##"[^ipsum]: How much wood would a woodchuck chuck. + +If a woodchuck could chuck wood. + + +# Forms of entertainment that aren't childish +"##; + let expected = r##"<div class="footnote-definition" id="ipsum"><sup class="footnote-definition-label">1</sup> +<p>How much wood would a woodchuck chuck.</p> +</div> +<p>If a woodchuck could chuck wood.</p> +<h1>Forms of entertainment that aren't childish</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn footnotes_test_6() { + let original = r##"> He's also really stupid. [^why] +> +> [^why]: Because your mamma! + +As such, we can guarantee that the non-childish forms of entertainment are probably more entertaining to adults, since, having had a whole childhood doing the childish ones, the non-childish ones are merely the ones that haven't gotten boring yet. +"##; + let expected = r##"<blockquote> +<p>He's also really stupid. <sup class="footnote-reference"><a href="#why">1</a></sup></p> +<div class="footnote-definition" id="why"><sup class="footnote-definition-label">1</sup> +<p>Because your mamma!</p> +</div> +</blockquote> +<p>As such, we can guarantee that the non-childish forms of entertainment are probably more entertaining to adults, since, having had a whole childhood doing the childish ones, the non-childish ones are merely the ones that haven't gotten boring yet.</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn footnotes_test_7() { + let original = r##"Nested footnotes are considered poor style. [^a] [^xkcd] + +[^a]: This does not mean that footnotes cannot reference each other. [^b] + +[^b]: This means that a footnote definition cannot be directly inside another footnote definition. +> This means that a footnote cannot be directly inside another footnote's body. [^e] +> +> [^e]: They can, however, be inside anything else. + +[^xkcd]: [The other kind of nested footnote is, however, considered poor style.](https://xkcd.com/1208/) +"##; + let expected = r##"<p>Nested footnotes are considered poor style. <sup class="footnote-reference"><a href="#a">1</a></sup> <sup class="footnote-reference"><a href="#xkcd">2</a></sup></p> +<div class="footnote-definition" id="a"><sup class="footnote-definition-label">1</sup> +<p>This does not mean that footnotes cannot reference each other. <sup class="footnote-reference"><a href="#b">3</a></sup></p> +</div> +<div class="footnote-definition" id="b"><sup class="footnote-definition-label">3</sup> +<p>This means that a footnote definition cannot be directly inside another footnote definition.</p> +<blockquote> +<p>This means that a footnote cannot be directly inside another footnote's body. <sup class="footnote-reference"><a href="#e">4</a></sup></p> +<div class="footnote-definition" id="e"><sup class="footnote-definition-label">4</sup> +<p>They can, however, be inside anything else.</p> +</div> +</blockquote> +</div> +<div class="footnote-definition" id="xkcd"><sup class="footnote-definition-label">2</sup> +<p><a href="https://xkcd.com/1208/">The other kind of nested footnote is, however, considered poor style.</a></p> +</div> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn footnotes_test_8() { + let original = r##"[^Doh] Ray Me Fa So La Te Do! [^1] + +[^Doh]: I know. Wrong Doe. And it won't render right. +[^1]: Common for people practicing music. +"##; + let expected = r##"<p><sup class="footnote-reference"><a href="#Doh">1</a></sup> Ray Me Fa So La Te Do! <sup class="footnote-reference"><a href="#1">2</a></sup></p> +<div class="footnote-definition" id="Doh"><sup class="footnote-definition-label">1</sup> +<p>I know. Wrong Doe. And it won't render right. +<sup class="footnote-reference"><a href="#1">2</a></sup>: Common for people practicing music.</p> +</div> +"##; + + test_markdown_html(original, expected, false); +} diff --git a/vendor/pulldown-cmark/tests/suite/gfm_strikethrough.rs b/vendor/pulldown-cmark/tests/suite/gfm_strikethrough.rs new file mode 100644 index 000000000..92413c306 --- /dev/null +++ b/vendor/pulldown-cmark/tests/suite/gfm_strikethrough.rs @@ -0,0 +1,27 @@ +// This file is auto-generated by the build script +// Please, do not modify it manually + +use super::test_markdown_html; + +#[test] +fn gfm_strikethrough_test_1() { + let original = r##"~~Hi~~ Hello, world! +"##; + let expected = r##"<p><del>Hi</del> Hello, world!</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn gfm_strikethrough_test_2() { + let original = r##"This ~~has a + +new paragraph~~. +"##; + let expected = r##"<p>This ~~has a</p> +<p>new paragraph~~.</p> +"##; + + test_markdown_html(original, expected, false); +} diff --git a/vendor/pulldown-cmark/tests/suite/gfm_table.rs b/vendor/pulldown-cmark/tests/suite/gfm_table.rs new file mode 100644 index 000000000..90743e8ea --- /dev/null +++ b/vendor/pulldown-cmark/tests/suite/gfm_table.rs @@ -0,0 +1,205 @@ +// This file is auto-generated by the build script +// Please, do not modify it manually + +use super::test_markdown_html; + +#[test] +fn gfm_table_test_1() { + let original = r##"| foo | bar | +| --- | --- | +| baz | bim | +"##; + let expected = r##"<table> +<thead> +<tr> +<th>foo</th> +<th>bar</th> +</tr> +</thead> +<tbody> +<tr> +<td>baz</td> +<td>bim</td> +</tr> +</tbody> +</table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn gfm_table_test_2() { + let original = r##"| abc | defghi | +:-: | -----------: +bar | baz +"##; + let expected = r##"<table> +<thead> +<tr> +<th style="text-align: center">abc</th> +<th style="text-align: right">defghi</th> +</tr> +</thead> +<tbody> +<tr> +<td style="text-align: center">bar</td> +<td style="text-align: right">baz</td> +</tr> +</tbody> +</table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn gfm_table_test_3() { + let original = r##"| f\|oo | +| ------ | +| b `\|` az | +| b **\|** im | +"##; + let expected = r##"<table> +<thead> +<tr> +<th>f|oo</th> +</tr> +</thead> +<tbody> +<tr> +<td>b <code>\|</code> az</td> +</tr> +<tr> +<td>b <strong>|</strong> im</td> +</tr> +</tbody> +</table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn gfm_table_test_4() { + let original = r##"| abc | def | +| --- | --- | +| bar | baz | +> bar +"##; + let expected = r##"<table> +<thead> +<tr> +<th>abc</th> +<th>def</th> +</tr> +</thead> +<tbody> +<tr> +<td>bar</td> +<td>baz</td> +</tr> +</tbody> +</table> +<blockquote> +<p>bar</p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn gfm_table_test_5() { + let original = r##"| abc | def | +| --- | --- | +| bar | baz | +bar + +bar +"##; + let expected = r##"<table> +<thead> +<tr> +<th>abc</th> +<th>def</th> +</tr> +</thead> +<tbody> +<tr> +<td>bar</td> +<td>baz</td> +</tr> +<tr> +<td>bar</td> +<td></td> +</tr> +</tbody> +</table> +<p>bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn gfm_table_test_6() { + let original = r##"| abc | def | +| --- | +| bar | +"##; + let expected = r##"<p>| abc | def | +| --- | +| bar |</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn gfm_table_test_7() { + let original = r##"| abc | def | +| --- | --- | +| bar | +| bar | baz | boo | +"##; + let expected = r##"<table> +<thead> +<tr> +<th>abc</th> +<th>def</th> +</tr> +</thead> +<tbody> +<tr> +<td>bar</td> +<td></td> +</tr> +<tr> +<td>bar</td> +<td>baz</td> +</tr> +</tbody> +</table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn gfm_table_test_8() { + let original = r##"| abc | def | +| --- | --- | +"##; + let expected = r##"<table> +<thead> +<tr> +<th>abc</th> +<th>def</th> +</tr> +</thead> +</table> +"##; + + test_markdown_html(original, expected, false); +} diff --git a/vendor/pulldown-cmark/tests/suite/gfm_tasklist.rs b/vendor/pulldown-cmark/tests/suite/gfm_tasklist.rs new file mode 100644 index 000000000..2962d545b --- /dev/null +++ b/vendor/pulldown-cmark/tests/suite/gfm_tasklist.rs @@ -0,0 +1,39 @@ +// This file is auto-generated by the build script +// Please, do not modify it manually + +use super::test_markdown_html; + +#[test] +fn gfm_tasklist_test_1() { + let original = r##"- [ ] foo +- [x] bar +"##; + let expected = r##"<ul> +<li><input disabled="" type="checkbox"> foo</li> +<li><input checked="" disabled="" type="checkbox"> bar</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn gfm_tasklist_test_2() { + let original = r##"- [x] foo + - [ ] bar + - [x] baz +- [ ] bim +"##; + let expected = r##"<ul> +<li><input checked="" disabled="" type="checkbox"> foo +<ul> +<li><input disabled="" type="checkbox"> bar</li> +<li><input checked="" disabled="" type="checkbox"> baz</li> +</ul> +</li> +<li><input disabled="" type="checkbox"> bim</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} diff --git a/vendor/pulldown-cmark/tests/suite/heading_attrs.rs b/vendor/pulldown-cmark/tests/suite/heading_attrs.rs new file mode 100644 index 000000000..e54489e2b --- /dev/null +++ b/vendor/pulldown-cmark/tests/suite/heading_attrs.rs @@ -0,0 +1,571 @@ +// This file is auto-generated by the build script +// Please, do not modify it manually + +use super::test_markdown_html; + +#[test] +fn heading_attrs_test_1() { + let original = r##"with the ID {#myh1} +=================== +with a class {.myclass} +------------ +multiple! {.myclass1 #myh3 .myclass2} +-- +"##; + let expected = r##"<h1 id="myh1">with the ID</h1> +<h2 class="myclass">with a class</h2> +<h2 id="myh3" class="myclass1 myclass2">multiple!</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_2() { + let original = r##"# with the ID {#myh1} +## with a class {.myclass} +### multiple! {.myclass1 #myh3 .myclass2} +"##; + let expected = r##"<h1 id="myh1">with the ID</h1> +<h2 class="myclass">with a class</h2> +<h3 id="myh3" class="myclass1 myclass2">multiple!</h3> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_3() { + let original = r##"# H1 # {#id1} +## H2 ## with ## multiple ## hashes ## {#id2} +### with trailing hash # ### {#id3} + +#### non-attribute-block {#id4} #### +"##; + let expected = r##"<h1 id="id1">H1</h1> +<h2 id="id2">H2 ## with ## multiple ## hashes</h2> +<h3 id="id3">with trailing hash #</h3> +<h4>non-attribute-block {#id4}</h4> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_4() { + let original = r##"# spaces {#myid1} +## tabs {#myid2} +"##; + let expected = r##"<h1 id="myid1">spaces</h1> +<h2 id="myid2">tabs</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_5() { + let original = r##"# H1 \ +nextline +"##; + let expected = r##"<h1>H1 \</h1> +<p>nextline</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_6() { + let original = r##"# H1 \ +{#myid} + +## H2 \ +nextline {.class} + +### H3 [link +](https://example.com/) {#myid3} +"##; + let expected = r##"<h1>H1 \</h1> +<p>{#myid}</p> +<h2>H2 \</h2> +<p>nextline {.class}</p> +<h3>H3 [link</h3> +<p>](https://example.com/) {#myid3}</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_7() { + let original = r##"H1 +cont +{#myid} +== +"##; + let expected = r##"<h1 id="myid">H1 +cont +</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_8() { + let original = r##"H1 +{ + .class1 + .class2 +} +== +"##; + let expected = r##"<h1>H1 +{ +.class1 +.class2 +}</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_9() { + let original = r##"# without space, not recommended{#id1} +## recommended style with spaces {#id2} +"##; + let expected = r##"<h1 id="id1">without space, not recommended</h1> +<h2 id="id2">recommended style with spaces</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_10() { + let original = r##"# H1 { #id1 } +## H2 {.myclass #id2 } +### H3 { .myclass} +"##; + let expected = r##"<h1 id="id1">H1</h1> +<h2 id="id2" class="myclass">H2</h2> +<h3 class="myclass">H3</h3> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_11() { + let original = r##"# H1 {#id1.class1.class2 .class3} +## H2 {.class1#id2.class2} +"##; + let expected = r##"<h1 id="id1.class1.class2" class="class3">H1</h1> +<h2 class="class1#id2.class2">H2</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_12() { + let original = r##"# H1 { #id1 +## H2 {#id2 +"##; + let expected = r##"<h1>H1 { #id1</h1> +<h2>H2 {#id2</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_13() { + let original = r##"# H1 #id1 } +## H2 #id2} +"##; + let expected = r##"<h1>H1 #id1 }</h1> +<h2>H2 #id2}</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_14() { + let original = r##"# H1 { #id1 } foo +## H2 {#id2} <!-- hello --> +"##; + let expected = r##"<h1>H1 { #id1 } foo</h1> +<h2>H2 {#id2} <!-- hello --></h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_15() { + let original = r##"# *H1* { #id1 } +## **H2** {#id2} +### _H3_ {#id3} +#### ~~H4~~ {#id4} +##### [text](uri) {#id5} +"##; + let expected = r##"<h1 id="id1"><em>H1</em></h1> +<h2 id="id2"><strong>H2</strong></h2> +<h3 id="id3"><em>H3</em></h3> +<h4 id="id4"><del>H4</del></h4> +<h5 id="id5"><a href="uri">text</a></h5> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_16() { + let original = r##"# H1 {#first #second #last} +"##; + let expected = r##"<h1 id="last">H1</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_17() { + let original = r##"# H1 {.z .a .zz} +"##; + let expected = r##"<h1 class="z a zz">H1</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_18() { + let original = r##"# H1 {.a .a .a} +"##; + let expected = r##"<h1 class="a a a">H1</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_19() { + let original = r##"# H1 {.myclass #myid} +## H2 {.z #m .a} +"##; + let expected = r##"<h1 id="myid" class="myclass">H1</h1> +<h2 id="m" class="z a">H2</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_20() { + let original = r##"# H1 {foo} +## H2 {#myid unknown this#is.ignored attr=value .myclass} +"##; + let expected = r##"<h1>H1</h1> +<h2 id="myid" class="myclass">H2</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_21() { + let original = r##"# H1 {.foo{unknown} +## H2 {.foo{.bar} +"##; + let expected = r##"<h1>H1 {.foo</h1> +<h2 class="bar">H2 {.foo</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_22() { + let original = r##"# H1 {.foo}bar} +"##; + let expected = r##"<h1>H1 {.foo}bar}</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_23() { + let original = r##"# H1 {<i>foo</i>} +"##; + let expected = r##"<h1>H1 {<i>foo</i>}</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_24() { + let original = r##"# H1 {.foo\} +"##; + let expected = r##"<h1>H1 {.foo}</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_25() { + let original = r##"H1 {.foo +.bar} +== +"##; + let expected = r##"<h1>H1 {.foo +.bar}</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_26() { + let original = r##"H1 {} {} +===== + +## H2 {} {} +"##; + let expected = r##"<h1>H1 {}</h1> +<h2>H2 {}</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_27() { + let original = r##"## H2 {} ## +"##; + let expected = r##"<h2>H2 {}</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_28() { + let original = r##"# H1 {\} +## this is also ok \{\} + +newline can be used for setext heading { +} +-- +"##; + let expected = r##"<h1>H1 {}</h1> +<h2>this is also ok {}</h2> +<h2>newline can be used for setext heading { +}</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_29() { + let original = r##"# H1 \{.foo} +## H2 \\{.bar} +### stray backslash at the end is preserved \ +"##; + let expected = r##"<h1 class="foo">H1 \</h1> +<h2 class="bar">H2 \</h2> +<h3>stray backslash at the end is preserved \</h3> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_30() { + let original = r##"H1 \{.foo} +== +H2 \\{.bar} +-- + +stray backslash at the end is preserved \ +-- +"##; + let expected = r##"<h1 class="foo">H1 \</h1> +<h2 class="bar">H2 \</h2> +<h2>stray backslash at the end is preserved \</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_31() { + let original = r##"# H1 {#`code`} +## H2 {#foo__bar__baz} +### H3 {#foo**bar**baz} +"##; + let expected = r##"<h1 id="`code`">H1</h1> +<h2 id="foo__bar__baz">H2</h2> +<h3 id="foo**bar**baz">H3</h3> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_32() { + let original = r##"H1 {#`code`} +== + +H2-1 {#foo__bar__baz} +---- + +H2-2 {#foo**bar**baz} +-- +"##; + let expected = r##"<h1 id="`code`">H1</h1> +<h2 id="foo__bar__baz">H2-1</h2> +<h2 id="foo**bar**baz">H2-2</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_33() { + let original = r##"# H1 {.foo#bar} +## H2 {#foo.bar} +### H3 {.a"b'c&d} +"##; + let expected = r##"<h1 class="foo#bar">H1</h1> +<h2 id="foo.bar">H2</h2> +<h3 class="a"b'c&d">H3</h3> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_34() { + let original = r##"# H1 {#} +## H2 {.} +"##; + let expected = r##"<h1>H1</h1> +<h2>H2</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_35() { + let original = r##"# H1 {#foo #} +# H1 {.foo . . .bar} +"##; + let expected = r##"<h1 id="foo">H1</h1> +<h1 class="foo bar">H1</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_36() { + let original = r##"# {} +## {} +### {\} +#### {} {} + +#{} +"##; + let expected = r##"<h1></h1> +<h2></h2> +<h3>{}</h3> +<h4>{}</h4> +<p>#{}</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_37() { + let original = r##"{} +== + +\{} +-- + +\ +-- + +{\} +== + +{}{} +-- +"##; + let expected = r##"<h1></h1> +<h2>\</h2> +<h2>\</h2> +<h1>{}</h1> +<h2>{}</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_38() { + let original = r##"# horizontal tab +# horizontal tab {#ht} +## form feed +## form feed{#ff} +### vertical tab +### vertical tab{#vt} +"##; + let expected = r##"<h1>horizontal tab </h1> +<h1 id="ht">horizontal tab </h1> +<h2>form feed</h2> +<h2 id="ff">form feed</h2> +<h3>vertical tab</h3> +<h3 id="vt">vertical tab</h3> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_39() { + let original = r##"# horizontal tab (U+000A) {#ht .myclass} +## form feed (U+000C) {#ff.myclass} + +# vertical tab (U+000B) {#vt.myclass} +"##; + let expected = r##"<h1 id="ht" class="myclass">horizontal tab (U+000A)</h1> +<h2 id="ff" class="myclass">form feed (U+000C)</h2> +<h1 id="vt.myclass">vertical tab (U+000B)</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn heading_attrs_test_40() { + let original = r##"# EN SPACE (U+2002) {#en-space .myclass} +## IDEOGRAPHIC SPACE (U+3000) {#ideographic-space .myclass} +"##; + let expected = r##"<h1 id="en-space .myclass">EN SPACE (U+2002)</h1> +<h2 id="ideographic-space .myclass">IDEOGRAPHIC SPACE (U+3000)</h2> +"##; + + test_markdown_html(original, expected, false); +} diff --git a/vendor/pulldown-cmark/tests/suite/mod.rs b/vendor/pulldown-cmark/tests/suite/mod.rs new file mode 100644 index 000000000..3afa3ba83 --- /dev/null +++ b/vendor/pulldown-cmark/tests/suite/mod.rs @@ -0,0 +1,14 @@ +// This file is auto-generated by the build script +// Please, do not modify it manually + +pub use super::test_markdown_html; + +mod footnotes; +mod gfm_strikethrough; +mod gfm_table; +mod gfm_tasklist; +mod heading_attrs; +mod regression; +mod smart_punct; +mod spec; +mod table; diff --git a/vendor/pulldown-cmark/tests/suite/regression.rs b/vendor/pulldown-cmark/tests/suite/regression.rs new file mode 100644 index 000000000..b3457e7be --- /dev/null +++ b/vendor/pulldown-cmark/tests/suite/regression.rs @@ -0,0 +1,1021 @@ +// This file is auto-generated by the build script +// Please, do not modify it manually + +use super::test_markdown_html; + +#[test] +fn regression_test_1() { + let original = r##"<details><summary>Testing 1..2..3..</summary> + +This is a test of the details element. + +</details> +"##; + let expected = r##"<details><summary>Testing 1..2..3..</summary> +<p>This is a test of the details element.</p> +</details> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_2() { + let original = r##"see the [many] [articles] [on] [QuickCheck]. + +[many]: https://medium.com/@jlouis666/quickcheck-advice-c357efb4e7e6 +[articles]: http://www.quviq.com/products/erlang-quickcheck/ +[on]: https://wiki.haskell.org/Introduction_to_QuickCheck1 +[QuickCheck]: https://hackage.haskell.org/package/QuickCheck +"##; + let expected = r##"<p>see the + <a href="https://medium.com/@jlouis666/quickcheck-advice-c357efb4e7e6">many</a> + <a href="http://www.quviq.com/products/erlang-quickcheck/">articles</a> + <a href="https://wiki.haskell.org/Introduction_to_QuickCheck1">on</a> + <a href="https://hackage.haskell.org/package/QuickCheck">QuickCheck</a>. +</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_3() { + let original = r##"[![debug-stub-derive on crates.io][cratesio-image]][cratesio] +[![debug-stub-derive on docs.rs][docsrs-image]][docsrs] + +[cratesio-image]: https://img.shields.io/crates/v/debug_stub_derive.svg +[cratesio]: https://crates.io/crates/debug_stub_derive +[docsrs-image]: https://docs.rs/debug_stub_derive/badge.svg?version=0.3.0 +[docsrs]: https://docs.rs/debug_stub_derive/0.3.0/ +"##; + let expected = r##"<p><a href="https://crates.io/crates/debug_stub_derive"><img src="https://img.shields.io/crates/v/debug_stub_derive.svg" alt="debug-stub-derive on crates.io" /></a> +<a href="https://docs.rs/debug_stub_derive/0.3.0/"><img src="https://docs.rs/debug_stub_derive/badge.svg?version=0.3.0" alt="debug-stub-derive on docs.rs" /></a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_4() { + let original = r##"| Title A | Title B | +| --------- | --------- | +| Content | Content | + +| Title A | Title B | Title C | Title D | +| --------- | --------- | --------- | ---------:| +| Content | Content | Conent | Content | +"##; + let expected = r##"<table><thead><tr><th>Title A </th><th>Title B </th></tr></thead><tbody> +<tr><td>Content </td><td>Content </td></tr> +</tbody></table> +<table><thead><tr><th>Title A </th><th>Title B </th><th>Title C </th><th style="text-align: right">Title D </th></tr></thead><tbody> +<tr><td>Content </td><td>Content </td><td>Conent </td><td style="text-align: right">Content </td></tr> +</tbody></table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_5() { + let original = r##"foo§__(bar)__ +"##; + let expected = r##"<p>foo§<strong>(bar)</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_6() { + let original = r##"<https://example.com> hello +"##; + let expected = r##"<p><a href="https://example.com">https://example.com</a> hello</p> + +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_7() { + let original = r##"[foo][bar] + +<!-- foo --> +[bar]: a +"##; + let expected = r##"<p><a href="a">foo</a></p> +<!-- foo --> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_8() { + let original = r##"<!-- <dl> --> +- **foo** (u8, u8) + + make something + +- **bar** (u16, u16) + + make something +"##; + let expected = r##"<!-- <dl> --> +<ul> +<li> +<p><strong>foo</strong> (u8, u8)</p> +<p>make something</p> +</li> +<li> +<p><strong>bar</strong> (u16, u16)</p> +<p>make something</p> +</li> +</ul> + +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_9() { + let original = r##"[` +i8 +`]( +../../../std/primitive.i8.html +) +"##; + let expected = r##"<p><a href="../../../std/primitive.i8.html"><code>i8</code></a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_10() { + let original = r##"[a] + +[a]: /url (title\\*) +"##; + let expected = r##"<p><a href="/url" title="title\*">a</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_11() { + let original = r##"[a] + +[a]: /url (title\)) +"##; + let expected = r##"<p><a href="/url" title="title)">a</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_12() { + let original = r##"[a] + +[a]: /url (title)) +"##; + let expected = r##"<p>[a]</p> +<p>[a]: /url (title))</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_13() { + let original = r##"a <?php this is not a valid processing tag +--- +b <?php but this is ?> +"##; + let expected = r##"<h2>a <?php this is not a valid processing tag</h2> +<p>b <?php but this is ?></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_14() { + let original = r##"[a]: u\ +foo +"##; + let expected = r##"<p>foo</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_15() { + let original = r##"\`foo` +"##; + let expected = r##"<p>`foo`</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_16() { + let original = r##"foo\\ +bar +"##; + let expected = r##"<p>foo\ +bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_17() { + let original = r##"1\. foo + +1\) bar +"##; + let expected = r##"<p>1. foo</p> +<p>1) bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_18() { + let original = r##"1... + +1.2.3. + +1 2 3 . + +1.|2.-3. + +1)2)3) +"##; + let expected = r##"<p>1...</p> +<p>1.2.3.</p> +<p>1 2 3 .</p> +<p>1.|2.-3.</p> +<p>1)2)3)</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_19() { + let original = r##"[](<<>) +"##; + let expected = r##"<p>[](<<>)</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_20() { + let original = r##"\``foo``bar` +"##; + let expected = r##"<p>`<code>foo``bar</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_21() { + let original = r##"\\`foo` +"##; + let expected = r##"<p>\<code>foo</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_22() { + let original = r##"[\\]: x + +YOLO +"##; + let expected = r##"<p>YOLO</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_23() { + let original = r##"lorem ipsum +A | B +---|--- +foo | bar +"##; + let expected = r##"<p>lorem ipsum +A | B +---|--- +foo | bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_24() { + let original = r##"foo|bar +---|--- +foo|bar +"##; + let expected = r##"<table><thead><tr><th>foo</th><th>bar</th></tr></thead> +<tbody><tr><td>foo</td><td>bar</td></tr></tbody> +</table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_25() { + let original = r##"foo|bar\\ +---|--- +foo|bar +"##; + let expected = r##"<table><thead><tr><th>foo</th><th>bar\</th></tr></thead> +<tbody><tr><td>foo</td><td>bar</td></tr></tbody> +</table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_26() { + let original = r##"[<foo>](url) +"##; + let expected = r##"<p><a href="url"><foo></a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_27() { + let original = r##"[<foo>bar</foo>](url) +"##; + let expected = r##"<p><a href="url"><foo>bar</foo></a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_28() { + let original = r##"![<http://example.com>](http://example.com/logo.png) +"##; + let expected = r##"<p><img alt="http://example.com" src="http://example.com/logo.png"></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_29() { + let original = r##"[<http://one> <http://two>](url) +"##; + let expected = r##"<p><a href="url"></a><a href="http://one">http://one</a> <a href="http://two">http://two</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_30() { + let original = r##"Markdown | Less | Pretty +--- | --- | --- + +some text +"##; + let expected = r##"<table><thead><tr><th>Markdown </th><th> Less </th><th> Pretty</th></tr></thead><tbody> +</tbody></table> +<p>some text</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_31() { + let original = r##"1. > foo +2. > +"##; + let expected = r##"<ol> +<li> +<blockquote> +<p>foo</p> +</blockquote> +</li> +<li> +<blockquote> +</blockquote> +</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_32() { + let original = r##"[ +x + +]: f +"##; + let expected = r##"<p>[ +x</p> +<p>]: f</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_33() { + let original = r##"[foo]: +"##; + let expected = r##"<p>[foo]:</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_34() { + let original = r##"> [foo +> bar]: /url +> +> [foo bar] +"##; + let expected = r##"<blockquote> +<p><a href="/url">foo bar</a></p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_35() { + let original = r##"> foo | bar +> --- | --- +yolo | swag +"##; + let expected = r##"<blockquote> +<table><thead><tr><th>foo</th><th>bar</th></tr></thead></table> +</blockquote> +<p>yolo | swag</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_36() { + let original = r##"<foo bar> +"##; + let expected = r##"<foo bar> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_37() { + let original = r##"<foo bar = + "hi"> +"##; + let expected = r##"<p><foo bar = + "hi"> </p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_38() { + let original = r##"~~*_**__ + +__a__ +"##; + let expected = r##"<p>~~*_**__</p> +<p><strong>a</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_39() { + let original = r##"> ` +> ` +"##; + let expected = r##"<blockquote> +<p><code></code></p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_40() { + let original = r##"`\|` +"##; + let expected = r##"<p><code>\|</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_41() { + let original = r##"Paragraph 1 + +Paragraph 2 +"##; + let expected = r##"<p>Paragraph 1</p> +<p>Paragraph 2</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_42() { + let original = r##"\[[link text](https://www.google.com/)\] +"##; + let expected = r##"<p>[<a href="https://www.google.com/">link text</a>]</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_43() { + let original = r##"foo | bar +--- | --- +[a](< | url>) +"##; + let expected = r##"<table><thead><tr><th>foo</th><th>bar</th></tr></thead><tbody><tr><td>[a](<</td><td>url>)</td></tr></tbody></table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_44() { + let original = r##"[a](url " +- - - +") +"##; + let expected = r##"<p>[a](url "</p> +<hr> +<p>")</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_45() { + let original = r##"[a](url + +) +"##; + let expected = r##"<p>[a](url</p> +<p>)</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_46() { + let original = r##"[a](b " + +") +"##; + let expected = r##"<p>[a](b "</p> +<p>")</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_47() { + let original = r##"<http:// > +"##; + let expected = r##"<p><http:// ></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_48() { + let original = r##"<http://> +"##; + let expected = r##"<p><http://></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_49() { + let original = r##"foo | bar +--- | --- +<http://| baz +"##; + let expected = r##"<table> +<thead> +<tr><th>foo</th><th>bar</th></tr> +</thead> +<tbody> +<tr><td><http://</td><td>baz</td></tr> +</tbody> +</table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_50() { + let original = r##"foo | bar +--- | --- +<http://|> +"##; + let expected = r##"<table> +<thead> +<tr><th>foo</th><th>bar</th></tr> +</thead> +<tbody> +<tr><td><http://</td><td>></td></tr> +</tbody> +</table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_51() { + let original = r##"<sup>\*hi</sup>\_ +"##; + let expected = r##"<p><sup>*hi</sup>_</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_52() { + let original = r##"email: <john@example.com>\_ +"##; + let expected = r##"<p>email: <a href="mailto:john@example.com">john@example.com</a>_</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_53() { + let original = r##"> [link](/url 'foo +> bar') +"##; + let expected = r##"<blockquote> +<p><a href="/url" title="foo +bar">link</a></p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_54() { + let original = r##"> [foo +> bar]: /url +> +> [foo bar] +"##; + let expected = r##"<blockquote> +<p><a href="/url">foo bar</a></p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_55() { + let original = r##"> [foo bar]: /url +> +> [foo +> bar] +"##; + let expected = r##"<blockquote> +<p><a href="/url">foo +bar</a></p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_56() { + let original = r##"> - [a +> b c]: /foo + +[a b c] +"##; + let expected = r##"<blockquote> +<ul> +<li></li> +</ul> +</blockquote> +<p><a href="/foo">a b c</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_57() { + let original = r##"[a +> b]: /foo + +[a b] [a > b] +"##; + let expected = r##"<p>[a</p> +<blockquote> +<p>b]: /foo</p> +</blockquote> +<p>[a b] [a > b]</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_58() { + let original = r##"[`cargo +package`] + +[`cargo package`]: https://example.com +"##; + let expected = r##"<p><a href="https://example.com"><code>cargo package</code></a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_59() { + let original = r##"> [`cargo +> package`] + +[`cargo package`]: https://example.com +"##; + let expected = r##"<blockquote> +<p><a href="https://example.com"><code>cargo package</code></a></p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_60() { + let original = r##"> `cargo +> package` +"##; + let expected = r##"<blockquote> +<p><code>cargo package</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_61() { + let original = r##"> Note: Though you should not rely on this, all pointers to <abbr +> title="Dynamically Sized Types">DSTs</abbr> are currently twice the size of +> the size of `usize` and have the same alignment. +"##; + let expected = r##"<blockquote> +<p>Note: Though you should not rely on this, all pointers to +<abbr title="Dynamically Sized Types">DSTs</abbr> are currently twice the size of +the size of <code>usize</code> and have the same alignment.</p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_62() { + let original = r##"Lorem ipsum.[^a] + +An unordered list before the footnotes: +* Ipsum +* Lorem + +[^a]: Cool. +"##; + let expected = r##"<p>Lorem ipsum.<sup class="footnote-reference"><a href="#a">1</a></sup></p> +<p>An unordered list before the footnotes:</p> +<ul> + <li>Ipsum</li> + <li>Lorem</li> +</ul> +<div class="footnote-definition" id="a"><sup class="footnote-definition-label">1</sup> + <p>Cool.</p> +</div> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_63() { + let original = r##"[][a] + +[a]: b + +# assimp-rs [![][crates-badge]][crates] + +[crates]: https://crates.io/crates/assimp +[crates-badge]: http://meritbadge.herokuapp.com/assimp +"##; + let expected = r##"<p><a href="b"></a></p> + +<h1>assimp-rs <a href="https://crates.io/crates/assimp"><img alt="" src="http://meritbadge.herokuapp.com/assimp"></a></h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_64() { + let original = r##"* A list. + + * A sublist. + + * Another sublist. + + +* A list. + + * A sublist. + + * Another sublist. + +"##; + let expected = r##"<ul> +<li> +<p>A list.</p> +<ul> +<li> +<p>A sublist.</p> +</li> +<li> +<p>Another sublist.</p> +</li> +</ul> +</li> +<li> +<p>A list.</p> +<ul> +<li> +<p>A sublist.</p> +</li> +<li> +<p>Another sublist.</p> +</li> +</ul> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_65() { + let original = r##"<foo +"##; + let expected = r##"<p><foo</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_66() { + let original = r##"> > a <a href +> > ="yo +> > lo"> +"##; + let expected = r##"<blockquote> +<blockquote> +<p>a <a href +="yo +lo"></p> +</blockquote> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_67() { + let original = r##" - the whitespace here are tabs +"##; + let expected = r##"<pre><code>- the whitespace here are tabs +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_68() { + let original = r##"1. a + 1. a + +a +2. a +"##; + let expected = r##"<ol> +<li>a +<ol> +<li>a</li> +</ol> +</li> +</ol> +<p>a +2. a</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_69() { + let original = r##"1. a +2. a + 2. a +"##; + let expected = r##"<ol> +<li>a</li> +<li>a +2. a</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn regression_test_70() { + let original = r##"* foo + + bar + + baz +"##; + let expected = r##"<ul> +<li>foo +<ul> +<li>bar</li> +<li>baz</li> +</ul> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} diff --git a/vendor/pulldown-cmark/tests/suite/smart_punct.rs b/vendor/pulldown-cmark/tests/suite/smart_punct.rs new file mode 100644 index 000000000..62681b648 --- /dev/null +++ b/vendor/pulldown-cmark/tests/suite/smart_punct.rs @@ -0,0 +1,201 @@ +// This file is auto-generated by the build script +// Please, do not modify it manually + +use super::test_markdown_html; + +#[test] +fn smart_punct_test_1() { + let original = r##""Hello," said the spider. +"'Shelob' is my name." +"##; + let expected = r##"<p>“Hello,” said the spider. +“‘Shelob’ is my name.”</p> +"##; + + test_markdown_html(original, expected, true); +} + +#[test] +fn smart_punct_test_2() { + let original = r##"'A', 'B', and 'C' are letters. +"##; + let expected = r##"<p>‘A’, ‘B’, and ‘C’ are letters.</p> +"##; + + test_markdown_html(original, expected, true); +} + +#[test] +fn smart_punct_test_3() { + let original = r##"'Oak,' 'elm,' and 'beech' are names of trees. +So is 'pine.' +"##; + let expected = r##"<p>‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. +So is ‘pine.’</p> +"##; + + test_markdown_html(original, expected, true); +} + +#[test] +fn smart_punct_test_4() { + let original = r##"'He said, "I want to go."' +"##; + let expected = r##"<p>‘He said, “I want to go.”’</p> +"##; + + test_markdown_html(original, expected, true); +} + +#[test] +fn smart_punct_test_5() { + let original = r##"Were you alive in the 70's? +"##; + let expected = r##"<p>Were you alive in the 70’s?</p> +"##; + + test_markdown_html(original, expected, true); +} + +#[test] +fn smart_punct_test_6() { + let original = r##"Here is some quoted '`code`' and a "[quoted link](url)". +"##; + let expected = r##"<p>Here is some quoted ‘<code>code</code>’ and a “<a href="url">quoted link</a>”.</p> +"##; + + test_markdown_html(original, expected, true); +} + +#[test] +fn smart_punct_test_7() { + let original = r##"'tis the season to be 'jolly' +"##; + let expected = r##"<p>’tis the season to be ‘jolly’</p> +"##; + + test_markdown_html(original, expected, true); +} + +#[test] +fn smart_punct_test_8() { + let original = r##"'We'll use Jane's boat and John's truck,' Jenna said. +"##; + let expected = r##"<p>‘We’ll use Jane’s boat and John’s truck,’ Jenna said.</p> +"##; + + test_markdown_html(original, expected, true); +} + +#[test] +fn smart_punct_test_9() { + let original = r##""A paragraph with no closing quote. + +"Second paragraph by same speaker, in fiction." +"##; + let expected = r##"<p>“A paragraph with no closing quote.</p> +<p>“Second paragraph by same speaker, in fiction.”</p> +"##; + + test_markdown_html(original, expected, true); +} + +#[test] +fn smart_punct_test_10() { + let original = r##"[a]'s b' +"##; + let expected = r##"<p>[a]’s b’</p> +"##; + + test_markdown_html(original, expected, true); +} + +#[test] +fn smart_punct_test_11() { + let original = r##"\"This is not smart.\" +This isn\'t either. +5\'8\" +"##; + let expected = r##"<p>"This is not smart." +This isn't either. +5'8"</p> +"##; + + test_markdown_html(original, expected, true); +} + +#[test] +fn smart_punct_test_12() { + let original = r##"Some dashes: em---em +en--en +em --- em +en -- en +2--3 +"##; + let expected = r##"<p>Some dashes: em—em +en–en +em — em +en – en +2–3</p> +"##; + + test_markdown_html(original, expected, true); +} + +#[test] +fn smart_punct_test_13() { + let original = r##"one- +two-- +three--- +four---- +five----- +six------ +seven------- +eight-------- +nine--------- +thirteen-------------. +"##; + let expected = r##"<p>one- +two– +three— +four–– +five—– +six—— +seven—–– +eight–––– +nine——— +thirteen———––.</p> +"##; + + test_markdown_html(original, expected, true); +} + +#[test] +fn smart_punct_test_14() { + let original = r##"Escaped hyphens: \-- \-\-\-. +"##; + let expected = r##"<p>Escaped hyphens: -- ---.</p> +"##; + + test_markdown_html(original, expected, true); +} + +#[test] +fn smart_punct_test_15() { + let original = r##"Ellipses...and...and.... +"##; + let expected = r##"<p>Ellipses…and…and….</p> +"##; + + test_markdown_html(original, expected, true); +} + +#[test] +fn smart_punct_test_16() { + let original = r##"No ellipses\.\.\. +"##; + let expected = r##"<p>No ellipses...</p> +"##; + + test_markdown_html(original, expected, true); +} diff --git a/vendor/pulldown-cmark/tests/suite/spec.rs b/vendor/pulldown-cmark/tests/suite/spec.rs new file mode 100644 index 000000000..3785ddacf --- /dev/null +++ b/vendor/pulldown-cmark/tests/suite/spec.rs @@ -0,0 +1,8490 @@ +// This file is auto-generated by the build script +// Please, do not modify it manually + +use super::test_markdown_html; + +#[test] +fn spec_test_1() { + let original = r##" foo baz bim +"##; + let expected = r##"<pre><code>foo baz bim +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_2() { + let original = r##" foo baz bim +"##; + let expected = r##"<pre><code>foo baz bim +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_3() { + let original = r##" a a + ὐ a +"##; + let expected = r##"<pre><code>a a +ὐ a +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_4() { + let original = r##" - foo + + bar +"##; + let expected = r##"<ul> +<li> +<p>foo</p> +<p>bar</p> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_5() { + let original = r##"- foo + + bar +"##; + let expected = r##"<ul> +<li> +<p>foo</p> +<pre><code> bar +</code></pre> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_6() { + let original = r##"> foo +"##; + let expected = r##"<blockquote> +<pre><code> foo +</code></pre> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_7() { + let original = r##"- foo +"##; + let expected = r##"<ul> +<li> +<pre><code> foo +</code></pre> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_8() { + let original = r##" foo + bar +"##; + let expected = r##"<pre><code>foo +bar +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_9() { + let original = r##" - foo + - bar + - baz +"##; + let expected = r##"<ul> +<li>foo +<ul> +<li>bar +<ul> +<li>baz</li> +</ul> +</li> +</ul> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_10() { + let original = r##"# Foo +"##; + let expected = r##"<h1>Foo</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_11() { + let original = r##"* * * +"##; + let expected = r##"<hr /> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_12() { + let original = r##"\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~ +"##; + let expected = r##"<p>!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_13() { + let original = r##"\ \A\a\ \3\φ\« +"##; + let expected = r##"<p>\ \A\a\ \3\φ\«</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_14() { + let original = r##"\*not emphasized* +\<br/> not a tag +\[not a link](/foo) +\`not code` +1\. not a list +\* not a list +\# not a heading +\[foo]: /url "not a reference" +\ö not a character entity +"##; + let expected = r##"<p>*not emphasized* +<br/> not a tag +[not a link](/foo) +`not code` +1. not a list +* not a list +# not a heading +[foo]: /url "not a reference" +&ouml; not a character entity</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_15() { + let original = r##"\\*emphasis* +"##; + let expected = r##"<p>\<em>emphasis</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_16() { + let original = r##"foo\ +bar +"##; + let expected = r##"<p>foo<br /> +bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_17() { + let original = r##"`` \[\` `` +"##; + let expected = r##"<p><code>\[\`</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_18() { + let original = r##" \[\] +"##; + let expected = r##"<pre><code>\[\] +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_19() { + let original = r##"~~~ +\[\] +~~~ +"##; + let expected = r##"<pre><code>\[\] +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_20() { + let original = r##"<http://example.com?find=\*> +"##; + let expected = r##"<p><a href="http://example.com?find=%5C*">http://example.com?find=\*</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_21() { + let original = r##"<a href="/bar\/)"> +"##; + let expected = r##"<a href="/bar\/)"> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_22() { + let original = r##"[foo](/bar\* "ti\*tle") +"##; + let expected = r##"<p><a href="/bar*" title="ti*tle">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_23() { + let original = r##"[foo] + +[foo]: /bar\* "ti\*tle" +"##; + let expected = r##"<p><a href="/bar*" title="ti*tle">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_24() { + let original = r##"``` foo\+bar +foo +``` +"##; + let expected = r##"<pre><code class="language-foo+bar">foo +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_25() { + let original = r##" & © Æ Ď +¾ ℋ ⅆ +∲ ≧̸ +"##; + let expected = r##"<p> & © Æ Ď +¾ ℋ ⅆ +∲ ≧̸</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_26() { + let original = r##"# Ӓ Ϡ � +"##; + let expected = r##"<p># Ӓ Ϡ �</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_27() { + let original = r##"" ആ ಫ +"##; + let expected = r##"<p>" ആ ಫ</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_28() { + let original = r##"  &x; &#; &#x; +� +&#abcdef0; +&ThisIsNotDefined; &hi?; +"##; + let expected = r##"<p>&nbsp &x; &#; &#x; +&#87654321; +&#abcdef0; +&ThisIsNotDefined; &hi?;</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_29() { + let original = r##"© +"##; + let expected = r##"<p>&copy</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_30() { + let original = r##"&MadeUpEntity; +"##; + let expected = r##"<p>&MadeUpEntity;</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_31() { + let original = r##"<a href="öö.html"> +"##; + let expected = r##"<a href="öö.html"> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_32() { + let original = r##"[foo](/föö "föö") +"##; + let expected = r##"<p><a href="/f%C3%B6%C3%B6" title="föö">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_33() { + let original = r##"[foo] + +[foo]: /föö "föö" +"##; + let expected = r##"<p><a href="/f%C3%B6%C3%B6" title="föö">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_34() { + let original = r##"``` föö +foo +``` +"##; + let expected = r##"<pre><code class="language-föö">foo +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_35() { + let original = r##"`föö` +"##; + let expected = r##"<p><code>f&ouml;&ouml;</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_36() { + let original = r##" föfö +"##; + let expected = r##"<pre><code>f&ouml;f&ouml; +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_37() { + let original = r##"*foo* +*foo* +"##; + let expected = r##"<p>*foo* +<em>foo</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_38() { + let original = r##"* foo + +* foo +"##; + let expected = r##"<p>* foo</p> +<ul> +<li>foo</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_39() { + let original = r##"foo bar +"##; + let expected = r##"<p>foo + +bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_40() { + let original = r##"	foo +"##; + let expected = r##"<p> foo</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_41() { + let original = r##"[a](url "tit") +"##; + let expected = r##"<p>[a](url "tit")</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_42() { + let original = r##"- `one +- two` +"##; + let expected = r##"<ul> +<li>`one</li> +<li>two`</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_43() { + let original = r##"*** +--- +___ +"##; + let expected = r##"<hr /> +<hr /> +<hr /> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_44() { + let original = r##"+++ +"##; + let expected = r##"<p>+++</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_45() { + let original = r##"=== +"##; + let expected = r##"<p>===</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_46() { + let original = r##"-- +** +__ +"##; + let expected = r##"<p>-- +** +__</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_47() { + let original = r##" *** + *** + *** +"##; + let expected = r##"<hr /> +<hr /> +<hr /> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_48() { + let original = r##" *** +"##; + let expected = r##"<pre><code>*** +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_49() { + let original = r##"Foo + *** +"##; + let expected = r##"<p>Foo +***</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_50() { + let original = r##"_____________________________________ +"##; + let expected = r##"<hr /> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_51() { + let original = r##" - - - +"##; + let expected = r##"<hr /> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_52() { + let original = r##" ** * ** * ** * ** +"##; + let expected = r##"<hr /> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_53() { + let original = r##"- - - - +"##; + let expected = r##"<hr /> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_54() { + let original = r##"- - - - +"##; + let expected = r##"<hr /> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_55() { + let original = r##"_ _ _ _ a + +a------ + +---a--- +"##; + let expected = r##"<p>_ _ _ _ a</p> +<p>a------</p> +<p>---a---</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_56() { + let original = r##" *-* +"##; + let expected = r##"<p><em>-</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_57() { + let original = r##"- foo +*** +- bar +"##; + let expected = r##"<ul> +<li>foo</li> +</ul> +<hr /> +<ul> +<li>bar</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_58() { + let original = r##"Foo +*** +bar +"##; + let expected = r##"<p>Foo</p> +<hr /> +<p>bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_59() { + let original = r##"Foo +--- +bar +"##; + let expected = r##"<h2>Foo</h2> +<p>bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_60() { + let original = r##"* Foo +* * * +* Bar +"##; + let expected = r##"<ul> +<li>Foo</li> +</ul> +<hr /> +<ul> +<li>Bar</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_61() { + let original = r##"- Foo +- * * * +"##; + let expected = r##"<ul> +<li>Foo</li> +<li> +<hr /> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_62() { + let original = r##"# foo +## foo +### foo +#### foo +##### foo +###### foo +"##; + let expected = r##"<h1>foo</h1> +<h2>foo</h2> +<h3>foo</h3> +<h4>foo</h4> +<h5>foo</h5> +<h6>foo</h6> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_63() { + let original = r##"####### foo +"##; + let expected = r##"<p>####### foo</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_64() { + let original = r##"#5 bolt + +#hashtag +"##; + let expected = r##"<p>#5 bolt</p> +<p>#hashtag</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_65() { + let original = r##"\## foo +"##; + let expected = r##"<p>## foo</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_66() { + let original = r##"# foo *bar* \*baz\* +"##; + let expected = r##"<h1>foo <em>bar</em> *baz*</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_67() { + let original = r##"# foo +"##; + let expected = r##"<h1>foo</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_68() { + let original = r##" ### foo + ## foo + # foo +"##; + let expected = r##"<h3>foo</h3> +<h2>foo</h2> +<h1>foo</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_69() { + let original = r##" # foo +"##; + let expected = r##"<pre><code># foo +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_70() { + let original = r##"foo + # bar +"##; + let expected = r##"<p>foo +# bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_71() { + let original = r##"## foo ## + ### bar ### +"##; + let expected = r##"<h2>foo</h2> +<h3>bar</h3> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_72() { + let original = r##"# foo ################################## +##### foo ## +"##; + let expected = r##"<h1>foo</h1> +<h5>foo</h5> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_73() { + let original = r##"### foo ### +"##; + let expected = r##"<h3>foo</h3> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_74() { + let original = r##"### foo ### b +"##; + let expected = r##"<h3>foo ### b</h3> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_75() { + let original = r##"# foo# +"##; + let expected = r##"<h1>foo#</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_76() { + let original = r##"### foo \### +## foo #\## +# foo \# +"##; + let expected = r##"<h3>foo ###</h3> +<h2>foo ###</h2> +<h1>foo #</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_77() { + let original = r##"**** +## foo +**** +"##; + let expected = r##"<hr /> +<h2>foo</h2> +<hr /> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_78() { + let original = r##"Foo bar +# baz +Bar foo +"##; + let expected = r##"<p>Foo bar</p> +<h1>baz</h1> +<p>Bar foo</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_79() { + let original = r##"## +# +### ### +"##; + let expected = r##"<h2></h2> +<h1></h1> +<h3></h3> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_80() { + let original = r##"Foo *bar* +========= + +Foo *bar* +--------- +"##; + let expected = r##"<h1>Foo <em>bar</em></h1> +<h2>Foo <em>bar</em></h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_81() { + let original = r##"Foo *bar +baz* +==== +"##; + let expected = r##"<h1>Foo <em>bar +baz</em></h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_82() { + let original = r##" Foo *bar +baz* +==== +"##; + let expected = r##"<h1>Foo <em>bar +baz</em></h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_83() { + let original = r##"Foo +------------------------- + +Foo += +"##; + let expected = r##"<h2>Foo</h2> +<h1>Foo</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_84() { + let original = r##" Foo +--- + + Foo +----- + + Foo + === +"##; + let expected = r##"<h2>Foo</h2> +<h2>Foo</h2> +<h1>Foo</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_85() { + let original = r##" Foo + --- + + Foo +--- +"##; + let expected = r##"<pre><code>Foo +--- + +Foo +</code></pre> +<hr /> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_86() { + let original = r##"Foo + ---- +"##; + let expected = r##"<h2>Foo</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_87() { + let original = r##"Foo + --- +"##; + let expected = r##"<p>Foo +---</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_88() { + let original = r##"Foo += = + +Foo +--- - +"##; + let expected = r##"<p>Foo += =</p> +<p>Foo</p> +<hr /> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_89() { + let original = r##"Foo +----- +"##; + let expected = r##"<h2>Foo</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_90() { + let original = r##"Foo\ +---- +"##; + let expected = r##"<h2>Foo\</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_91() { + let original = r##"`Foo +---- +` + +<a title="a lot +--- +of dashes"/> +"##; + let expected = r##"<h2>`Foo</h2> +<p>`</p> +<h2><a title="a lot</h2> +<p>of dashes"/></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_92() { + let original = r##"> Foo +--- +"##; + let expected = r##"<blockquote> +<p>Foo</p> +</blockquote> +<hr /> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_93() { + let original = r##"> foo +bar +=== +"##; + let expected = r##"<blockquote> +<p>foo +bar +===</p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_94() { + let original = r##"- Foo +--- +"##; + let expected = r##"<ul> +<li>Foo</li> +</ul> +<hr /> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_95() { + let original = r##"Foo +Bar +--- +"##; + let expected = r##"<h2>Foo +Bar</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_96() { + let original = r##"--- +Foo +--- +Bar +--- +Baz +"##; + let expected = r##"<hr /> +<h2>Foo</h2> +<h2>Bar</h2> +<p>Baz</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_97() { + let original = r##" +==== +"##; + let expected = r##"<p>====</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_98() { + let original = r##"--- +--- +"##; + let expected = r##"<hr /> +<hr /> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_99() { + let original = r##"- foo +----- +"##; + let expected = r##"<ul> +<li>foo</li> +</ul> +<hr /> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_100() { + let original = r##" foo +--- +"##; + let expected = r##"<pre><code>foo +</code></pre> +<hr /> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_101() { + let original = r##"> foo +----- +"##; + let expected = r##"<blockquote> +<p>foo</p> +</blockquote> +<hr /> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_102() { + let original = r##"\> foo +------ +"##; + let expected = r##"<h2>> foo</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_103() { + let original = r##"Foo + +bar +--- +baz +"##; + let expected = r##"<p>Foo</p> +<h2>bar</h2> +<p>baz</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_104() { + let original = r##"Foo +bar + +--- + +baz +"##; + let expected = r##"<p>Foo +bar</p> +<hr /> +<p>baz</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_105() { + let original = r##"Foo +bar +* * * +baz +"##; + let expected = r##"<p>Foo +bar</p> +<hr /> +<p>baz</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_106() { + let original = r##"Foo +bar +\--- +baz +"##; + let expected = r##"<p>Foo +bar +--- +baz</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_107() { + let original = r##" a simple + indented code block +"##; + let expected = r##"<pre><code>a simple + indented code block +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_108() { + let original = r##" - foo + + bar +"##; + let expected = r##"<ul> +<li> +<p>foo</p> +<p>bar</p> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_109() { + let original = r##"1. foo + + - bar +"##; + let expected = r##"<ol> +<li> +<p>foo</p> +<ul> +<li>bar</li> +</ul> +</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_110() { + let original = r##" <a/> + *hi* + + - one +"##; + let expected = r##"<pre><code><a/> +*hi* + +- one +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_111() { + let original = r##" chunk1 + + chunk2 + + + + chunk3 +"##; + let expected = r##"<pre><code>chunk1 + +chunk2 + + + +chunk3 +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_112() { + let original = r##" chunk1 + + chunk2 +"##; + let expected = r##"<pre><code>chunk1 + + chunk2 +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_113() { + let original = r##"Foo + bar + +"##; + let expected = r##"<p>Foo +bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_114() { + let original = r##" foo +bar +"##; + let expected = r##"<pre><code>foo +</code></pre> +<p>bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_115() { + let original = r##"# Heading + foo +Heading +------ + foo +---- +"##; + let expected = r##"<h1>Heading</h1> +<pre><code>foo +</code></pre> +<h2>Heading</h2> +<pre><code>foo +</code></pre> +<hr /> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_116() { + let original = r##" foo + bar +"##; + let expected = r##"<pre><code> foo +bar +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_117() { + let original = r##" + + foo + + +"##; + let expected = r##"<pre><code>foo +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_118() { + let original = r##" foo +"##; + let expected = r##"<pre><code>foo +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_119() { + let original = r##"``` +< + > +``` +"##; + let expected = r##"<pre><code>< + > +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_120() { + let original = r##"~~~ +< + > +~~~ +"##; + let expected = r##"<pre><code>< + > +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_121() { + let original = r##"`` +foo +`` +"##; + let expected = r##"<p><code>foo</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_122() { + let original = r##"``` +aaa +~~~ +``` +"##; + let expected = r##"<pre><code>aaa +~~~ +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_123() { + let original = r##"~~~ +aaa +``` +~~~ +"##; + let expected = r##"<pre><code>aaa +``` +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_124() { + let original = r##"```` +aaa +``` +`````` +"##; + let expected = r##"<pre><code>aaa +``` +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_125() { + let original = r##"~~~~ +aaa +~~~ +~~~~ +"##; + let expected = r##"<pre><code>aaa +~~~ +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_126() { + let original = r##"``` +"##; + let expected = r##"<pre><code></code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_127() { + let original = r##"````` + +``` +aaa +"##; + let expected = r##"<pre><code> +``` +aaa +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_128() { + let original = r##"> ``` +> aaa + +bbb +"##; + let expected = r##"<blockquote> +<pre><code>aaa +</code></pre> +</blockquote> +<p>bbb</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_129() { + let original = r##"``` + + +``` +"##; + let expected = r##"<pre><code> + +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_130() { + let original = r##"``` +``` +"##; + let expected = r##"<pre><code></code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_131() { + let original = r##" ``` + aaa +aaa +``` +"##; + let expected = r##"<pre><code>aaa +aaa +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_132() { + let original = r##" ``` +aaa + aaa +aaa + ``` +"##; + let expected = r##"<pre><code>aaa +aaa +aaa +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_133() { + let original = r##" ``` + aaa + aaa + aaa + ``` +"##; + let expected = r##"<pre><code>aaa + aaa +aaa +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_134() { + let original = r##" ``` + aaa + ``` +"##; + let expected = r##"<pre><code>``` +aaa +``` +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_135() { + let original = r##"``` +aaa + ``` +"##; + let expected = r##"<pre><code>aaa +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_136() { + let original = r##" ``` +aaa + ``` +"##; + let expected = r##"<pre><code>aaa +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_137() { + let original = r##"``` +aaa + ``` +"##; + let expected = r##"<pre><code>aaa + ``` +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_138() { + let original = r##"``` ``` +aaa +"##; + let expected = r##"<p><code> </code> +aaa</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_139() { + let original = r##"~~~~~~ +aaa +~~~ ~~ +"##; + let expected = r##"<pre><code>aaa +~~~ ~~ +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_140() { + let original = r##"foo +``` +bar +``` +baz +"##; + let expected = r##"<p>foo</p> +<pre><code>bar +</code></pre> +<p>baz</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_141() { + let original = r##"foo +--- +~~~ +bar +~~~ +# baz +"##; + let expected = r##"<h2>foo</h2> +<pre><code>bar +</code></pre> +<h1>baz</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_142() { + let original = r##"```ruby +def foo(x) + return 3 +end +``` +"##; + let expected = r##"<pre><code class="language-ruby">def foo(x) + return 3 +end +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_143() { + let original = r##"~~~~ ruby startline=3 $%@#$ +def foo(x) + return 3 +end +~~~~~~~ +"##; + let expected = r##"<pre><code class="language-ruby">def foo(x) + return 3 +end +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_144() { + let original = r##"````; +```` +"##; + let expected = r##"<pre><code class="language-;"></code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_145() { + let original = r##"``` aa ``` +foo +"##; + let expected = r##"<p><code>aa</code> +foo</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_146() { + let original = r##"~~~ aa ``` ~~~ +foo +~~~ +"##; + let expected = r##"<pre><code class="language-aa">foo +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_147() { + let original = r##"``` +``` aaa +``` +"##; + let expected = r##"<pre><code>``` aaa +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_148() { + let original = r##"<table><tr><td> +<pre> +**Hello**, + +_world_. +</pre> +</td></tr></table> +"##; + let expected = r##"<table><tr><td> +<pre> +**Hello**, +<p><em>world</em>. +</pre></p> +</td></tr></table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_149() { + let original = r##"<table> + <tr> + <td> + hi + </td> + </tr> +</table> + +okay. +"##; + let expected = r##"<table> + <tr> + <td> + hi + </td> + </tr> +</table> +<p>okay.</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_150() { + let original = r##" <div> + *hello* + <foo><a> +"##; + let expected = r##" <div> + *hello* + <foo><a> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_151() { + let original = r##"</div> +*foo* +"##; + let expected = r##"</div> +*foo* +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_152() { + let original = r##"<DIV CLASS="foo"> + +*Markdown* + +</DIV> +"##; + let expected = r##"<DIV CLASS="foo"> +<p><em>Markdown</em></p> +</DIV> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_153() { + let original = r##"<div id="foo" + class="bar"> +</div> +"##; + let expected = r##"<div id="foo" + class="bar"> +</div> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_154() { + let original = r##"<div id="foo" class="bar + baz"> +</div> +"##; + let expected = r##"<div id="foo" class="bar + baz"> +</div> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_155() { + let original = r##"<div> +*foo* + +*bar* +"##; + let expected = r##"<div> +*foo* +<p><em>bar</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_156() { + let original = r##"<div id="foo" +*hi* +"##; + let expected = r##"<div id="foo" +*hi* +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_157() { + let original = r##"<div class +foo +"##; + let expected = r##"<div class +foo +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_158() { + let original = r##"<div *???-&&&-<--- +*foo* +"##; + let expected = r##"<div *???-&&&-<--- +*foo* +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_159() { + let original = r##"<div><a href="bar">*foo*</a></div> +"##; + let expected = r##"<div><a href="bar">*foo*</a></div> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_160() { + let original = r##"<table><tr><td> +foo +</td></tr></table> +"##; + let expected = r##"<table><tr><td> +foo +</td></tr></table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_161() { + let original = r##"<div></div> +``` c +int x = 33; +``` +"##; + let expected = r##"<div></div> +``` c +int x = 33; +``` +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_162() { + let original = r##"<a href="foo"> +*bar* +</a> +"##; + let expected = r##"<a href="foo"> +*bar* +</a> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_163() { + let original = r##"<Warning> +*bar* +</Warning> +"##; + let expected = r##"<Warning> +*bar* +</Warning> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_164() { + let original = r##"<i class="foo"> +*bar* +</i> +"##; + let expected = r##"<i class="foo"> +*bar* +</i> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_165() { + let original = r##"</ins> +*bar* +"##; + let expected = r##"</ins> +*bar* +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_166() { + let original = r##"<del> +*foo* +</del> +"##; + let expected = r##"<del> +*foo* +</del> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_167() { + let original = r##"<del> + +*foo* + +</del> +"##; + let expected = r##"<del> +<p><em>foo</em></p> +</del> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_168() { + let original = r##"<del>*foo*</del> +"##; + let expected = r##"<p><del><em>foo</em></del></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_169() { + let original = r##"<pre language="haskell"><code> +import Text.HTML.TagSoup + +main :: IO () +main = print $ parseTags tags +</code></pre> +okay +"##; + let expected = r##"<pre language="haskell"><code> +import Text.HTML.TagSoup + +main :: IO () +main = print $ parseTags tags +</code></pre> +<p>okay</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_170() { + let original = r##"<script type="text/javascript"> +// JavaScript example + +document.getElementById("demo").innerHTML = "Hello JavaScript!"; +</script> +okay +"##; + let expected = r##"<script type="text/javascript"> +// JavaScript example + +document.getElementById("demo").innerHTML = "Hello JavaScript!"; +</script> +<p>okay</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_171() { + let original = r##"<textarea> + +*foo* + +_bar_ + +</textarea> +"##; + let expected = r##"<textarea> + +*foo* + +_bar_ + +</textarea> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_172() { + let original = r##"<style + type="text/css"> +h1 {color:red;} + +p {color:blue;} +</style> +okay +"##; + let expected = r##"<style + type="text/css"> +h1 {color:red;} + +p {color:blue;} +</style> +<p>okay</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_173() { + let original = r##"<style + type="text/css"> + +foo +"##; + let expected = r##"<style + type="text/css"> + +foo +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_174() { + let original = r##"> <div> +> foo + +bar +"##; + let expected = r##"<blockquote> +<div> +foo +</blockquote> +<p>bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_175() { + let original = r##"- <div> +- foo +"##; + let expected = r##"<ul> +<li> +<div> +</li> +<li>foo</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_176() { + let original = r##"<style>p{color:red;}</style> +*foo* +"##; + let expected = r##"<style>p{color:red;}</style> +<p><em>foo</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_177() { + let original = r##"<!-- foo -->*bar* +*baz* +"##; + let expected = r##"<!-- foo -->*bar* +<p><em>baz</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_178() { + let original = r##"<script> +foo +</script>1. *bar* +"##; + let expected = r##"<script> +foo +</script>1. *bar* +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_179() { + let original = r##"<!-- Foo + +bar + baz --> +okay +"##; + let expected = r##"<!-- Foo + +bar + baz --> +<p>okay</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_180() { + let original = r##"<?php + + echo '>'; + +?> +okay +"##; + let expected = r##"<?php + + echo '>'; + +?> +<p>okay</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_181() { + let original = r##"<!DOCTYPE html> +"##; + let expected = r##"<!DOCTYPE html> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_182() { + let original = r##"<![CDATA[ +function matchwo(a,b) +{ + if (a < b && a < 0) then { + return 1; + + } else { + + return 0; + } +} +]]> +okay +"##; + let expected = r##"<![CDATA[ +function matchwo(a,b) +{ + if (a < b && a < 0) then { + return 1; + + } else { + + return 0; + } +} +]]> +<p>okay</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_183() { + let original = r##" <!-- foo --> + + <!-- foo --> +"##; + let expected = r##" <!-- foo --> +<pre><code><!-- foo --> +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_184() { + let original = r##" <div> + + <div> +"##; + let expected = r##" <div> +<pre><code><div> +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_185() { + let original = r##"Foo +<div> +bar +</div> +"##; + let expected = r##"<p>Foo</p> +<div> +bar +</div> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_186() { + let original = r##"<div> +bar +</div> +*foo* +"##; + let expected = r##"<div> +bar +</div> +*foo* +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_187() { + let original = r##"Foo +<a href="bar"> +baz +"##; + let expected = r##"<p>Foo +<a href="bar"> +baz</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_188() { + let original = r##"<div> + +*Emphasized* text. + +</div> +"##; + let expected = r##"<div> +<p><em>Emphasized</em> text.</p> +</div> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_189() { + let original = r##"<div> +*Emphasized* text. +</div> +"##; + let expected = r##"<div> +*Emphasized* text. +</div> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_190() { + let original = r##"<table> + +<tr> + +<td> +Hi +</td> + +</tr> + +</table> +"##; + let expected = r##"<table> +<tr> +<td> +Hi +</td> +</tr> +</table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_191() { + let original = r##"<table> + + <tr> + + <td> + Hi + </td> + + </tr> + +</table> +"##; + let expected = r##"<table> + <tr> +<pre><code><td> + Hi +</td> +</code></pre> + </tr> +</table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_192() { + let original = r##"[foo]: /url "title" + +[foo] +"##; + let expected = r##"<p><a href="/url" title="title">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_193() { + let original = r##" [foo]: + /url + 'the title' + +[foo] +"##; + let expected = r##"<p><a href="/url" title="the title">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_194() { + let original = r##"[Foo*bar\]]:my_(url) 'title (with parens)' + +[Foo*bar\]] +"##; + let expected = r##"<p><a href="my_(url)" title="title (with parens)">Foo*bar]</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_195() { + let original = r##"[Foo bar]: +<my url> +'title' + +[Foo bar] +"##; + let expected = r##"<p><a href="my%20url" title="title">Foo bar</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_196() { + let original = r##"[foo]: /url ' +title +line1 +line2 +' + +[foo] +"##; + let expected = r##"<p><a href="/url" title=" +title +line1 +line2 +">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_197() { + let original = r##"[foo]: /url 'title + +with blank line' + +[foo] +"##; + let expected = r##"<p>[foo]: /url 'title</p> +<p>with blank line'</p> +<p>[foo]</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_198() { + let original = r##"[foo]: +/url + +[foo] +"##; + let expected = r##"<p><a href="/url">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_199() { + let original = r##"[foo]: + +[foo] +"##; + let expected = r##"<p>[foo]:</p> +<p>[foo]</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_200() { + let original = r##"[foo]: <> + +[foo] +"##; + let expected = r##"<p><a href="">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_201() { + let original = r##"[foo]: <bar>(baz) + +[foo] +"##; + let expected = r##"<p>[foo]: <bar>(baz)</p> +<p>[foo]</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_202() { + let original = r##"[foo]: /url\bar\*baz "foo\"bar\baz" + +[foo] +"##; + let expected = r##"<p><a href="/url%5Cbar*baz" title="foo"bar\baz">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_203() { + let original = r##"[foo] + +[foo]: url +"##; + let expected = r##"<p><a href="url">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_204() { + let original = r##"[foo] + +[foo]: first +[foo]: second +"##; + let expected = r##"<p><a href="first">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_205() { + let original = r##"[FOO]: /url + +[Foo] +"##; + let expected = r##"<p><a href="/url">Foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_206() { + let original = r##"[ΑΓΩ]: /φου + +[αγω] +"##; + let expected = r##"<p><a href="/%CF%86%CE%BF%CF%85">αγω</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_207() { + let original = r##"[foo]: /url +"##; + let expected = r##""##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_208() { + let original = r##"[ +foo +]: /url +bar +"##; + let expected = r##"<p>bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_209() { + let original = r##"[foo]: /url "title" ok +"##; + let expected = r##"<p>[foo]: /url "title" ok</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_210() { + let original = r##"[foo]: /url +"title" ok +"##; + let expected = r##"<p>"title" ok</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_211() { + let original = r##" [foo]: /url "title" + +[foo] +"##; + let expected = r##"<pre><code>[foo]: /url "title" +</code></pre> +<p>[foo]</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_212() { + let original = r##"``` +[foo]: /url +``` + +[foo] +"##; + let expected = r##"<pre><code>[foo]: /url +</code></pre> +<p>[foo]</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_213() { + let original = r##"Foo +[bar]: /baz + +[bar] +"##; + let expected = r##"<p>Foo +[bar]: /baz</p> +<p>[bar]</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_214() { + let original = r##"# [Foo] +[foo]: /url +> bar +"##; + let expected = r##"<h1><a href="/url">Foo</a></h1> +<blockquote> +<p>bar</p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_215() { + let original = r##"[foo]: /url +bar +=== +[foo] +"##; + let expected = r##"<h1>bar</h1> +<p><a href="/url">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_216() { + let original = r##"[foo]: /url +=== +[foo] +"##; + let expected = r##"<p>=== +<a href="/url">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_217() { + let original = r##"[foo]: /foo-url "foo" +[bar]: /bar-url + "bar" +[baz]: /baz-url + +[foo], +[bar], +[baz] +"##; + let expected = 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> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_218() { + let original = r##"[foo] + +> [foo]: /url +"##; + let expected = r##"<p><a href="/url">foo</a></p> +<blockquote> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_219() { + let original = r##"aaa + +bbb +"##; + let expected = r##"<p>aaa</p> +<p>bbb</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_220() { + let original = r##"aaa +bbb + +ccc +ddd +"##; + let expected = r##"<p>aaa +bbb</p> +<p>ccc +ddd</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_221() { + let original = r##"aaa + + +bbb +"##; + let expected = r##"<p>aaa</p> +<p>bbb</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_222() { + let original = r##" aaa + bbb +"##; + let expected = r##"<p>aaa +bbb</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_223() { + let original = r##"aaa + bbb + ccc +"##; + let expected = r##"<p>aaa +bbb +ccc</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_224() { + let original = r##" aaa +bbb +"##; + let expected = r##"<p>aaa +bbb</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_225() { + let original = r##" aaa +bbb +"##; + let expected = r##"<pre><code>aaa +</code></pre> +<p>bbb</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_226() { + let original = r##"aaa +bbb +"##; + let expected = r##"<p>aaa<br /> +bbb</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_227() { + let original = r##" + +aaa + + +# aaa + + +"##; + let expected = r##"<p>aaa</p> +<h1>aaa</h1> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_228() { + let original = r##"> # Foo +> bar +> baz +"##; + let expected = r##"<blockquote> +<h1>Foo</h1> +<p>bar +baz</p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_229() { + let original = r##"># Foo +>bar +> baz +"##; + let expected = r##"<blockquote> +<h1>Foo</h1> +<p>bar +baz</p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_230() { + let original = r##" > # Foo + > bar + > baz +"##; + let expected = r##"<blockquote> +<h1>Foo</h1> +<p>bar +baz</p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_231() { + let original = r##" > # Foo + > bar + > baz +"##; + let expected = r##"<pre><code>> # Foo +> bar +> baz +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_232() { + let original = r##"> # Foo +> bar +baz +"##; + let expected = r##"<blockquote> +<h1>Foo</h1> +<p>bar +baz</p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_233() { + let original = r##"> bar +baz +> foo +"##; + let expected = r##"<blockquote> +<p>bar +baz +foo</p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_234() { + let original = r##"> foo +--- +"##; + let expected = r##"<blockquote> +<p>foo</p> +</blockquote> +<hr /> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_235() { + let original = r##"> - foo +- bar +"##; + let expected = r##"<blockquote> +<ul> +<li>foo</li> +</ul> +</blockquote> +<ul> +<li>bar</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_236() { + let original = r##"> foo + bar +"##; + let expected = r##"<blockquote> +<pre><code>foo +</code></pre> +</blockquote> +<pre><code>bar +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_237() { + let original = r##"> ``` +foo +``` +"##; + let expected = r##"<blockquote> +<pre><code></code></pre> +</blockquote> +<p>foo</p> +<pre><code></code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_238() { + let original = r##"> foo + - bar +"##; + let expected = r##"<blockquote> +<p>foo +- bar</p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_239() { + let original = r##"> +"##; + let expected = r##"<blockquote> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_240() { + let original = r##"> +> +> +"##; + let expected = r##"<blockquote> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_241() { + let original = r##"> +> foo +> +"##; + let expected = r##"<blockquote> +<p>foo</p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_242() { + let original = r##"> foo + +> bar +"##; + let expected = r##"<blockquote> +<p>foo</p> +</blockquote> +<blockquote> +<p>bar</p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_243() { + let original = r##"> foo +> bar +"##; + let expected = r##"<blockquote> +<p>foo +bar</p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_244() { + let original = r##"> foo +> +> bar +"##; + let expected = r##"<blockquote> +<p>foo</p> +<p>bar</p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_245() { + let original = r##"foo +> bar +"##; + let expected = r##"<p>foo</p> +<blockquote> +<p>bar</p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_246() { + let original = r##"> aaa +*** +> bbb +"##; + let expected = r##"<blockquote> +<p>aaa</p> +</blockquote> +<hr /> +<blockquote> +<p>bbb</p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_247() { + let original = r##"> bar +baz +"##; + let expected = r##"<blockquote> +<p>bar +baz</p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_248() { + let original = r##"> bar + +baz +"##; + let expected = r##"<blockquote> +<p>bar</p> +</blockquote> +<p>baz</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_249() { + let original = r##"> bar +> +baz +"##; + let expected = r##"<blockquote> +<p>bar</p> +</blockquote> +<p>baz</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_250() { + let original = r##"> > > foo +bar +"##; + let expected = r##"<blockquote> +<blockquote> +<blockquote> +<p>foo +bar</p> +</blockquote> +</blockquote> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_251() { + let original = r##">>> foo +> bar +>>baz +"##; + let expected = r##"<blockquote> +<blockquote> +<blockquote> +<p>foo +bar +baz</p> +</blockquote> +</blockquote> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_252() { + let original = r##"> code + +> not code +"##; + let expected = r##"<blockquote> +<pre><code>code +</code></pre> +</blockquote> +<blockquote> +<p>not code</p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_253() { + let original = r##"A paragraph +with two lines. + + indented code + +> A block quote. +"##; + let expected = r##"<p>A paragraph +with two lines.</p> +<pre><code>indented code +</code></pre> +<blockquote> +<p>A block quote.</p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_254() { + let original = r##"1. A paragraph + with two lines. + + indented code + + > A block quote. +"##; + let expected = r##"<ol> +<li> +<p>A paragraph +with two lines.</p> +<pre><code>indented code +</code></pre> +<blockquote> +<p>A block quote.</p> +</blockquote> +</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_255() { + let original = r##"- one + + two +"##; + let expected = r##"<ul> +<li>one</li> +</ul> +<p>two</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_256() { + let original = r##"- one + + two +"##; + let expected = r##"<ul> +<li> +<p>one</p> +<p>two</p> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_257() { + let original = r##" - one + + two +"##; + let expected = r##"<ul> +<li>one</li> +</ul> +<pre><code> two +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_258() { + let original = r##" - one + + two +"##; + let expected = r##"<ul> +<li> +<p>one</p> +<p>two</p> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_259() { + let original = r##" > > 1. one +>> +>> two +"##; + let expected = r##"<blockquote> +<blockquote> +<ol> +<li> +<p>one</p> +<p>two</p> +</li> +</ol> +</blockquote> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_260() { + let original = r##">>- one +>> + > > two +"##; + let expected = r##"<blockquote> +<blockquote> +<ul> +<li>one</li> +</ul> +<p>two</p> +</blockquote> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_261() { + let original = r##"-one + +2.two +"##; + let expected = r##"<p>-one</p> +<p>2.two</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_262() { + let original = r##"- foo + + + bar +"##; + let expected = r##"<ul> +<li> +<p>foo</p> +<p>bar</p> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_263() { + let original = r##"1. foo + + ``` + bar + ``` + + baz + + > bam +"##; + let expected = r##"<ol> +<li> +<p>foo</p> +<pre><code>bar +</code></pre> +<p>baz</p> +<blockquote> +<p>bam</p> +</blockquote> +</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_264() { + let original = r##"- Foo + + bar + + + baz +"##; + let expected = r##"<ul> +<li> +<p>Foo</p> +<pre><code>bar + + +baz +</code></pre> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_265() { + let original = r##"123456789. ok +"##; + let expected = r##"<ol start="123456789"> +<li>ok</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_266() { + let original = r##"1234567890. not ok +"##; + let expected = r##"<p>1234567890. not ok</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_267() { + let original = r##"0. ok +"##; + let expected = r##"<ol start="0"> +<li>ok</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_268() { + let original = r##"003. ok +"##; + let expected = r##"<ol start="3"> +<li>ok</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_269() { + let original = r##"-1. not ok +"##; + let expected = r##"<p>-1. not ok</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_270() { + let original = r##"- foo + + bar +"##; + let expected = r##"<ul> +<li> +<p>foo</p> +<pre><code>bar +</code></pre> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_271() { + let original = r##" 10. foo + + bar +"##; + let expected = r##"<ol start="10"> +<li> +<p>foo</p> +<pre><code>bar +</code></pre> +</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_272() { + let original = r##" indented code + +paragraph + + more code +"##; + let expected = r##"<pre><code>indented code +</code></pre> +<p>paragraph</p> +<pre><code>more code +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_273() { + let original = r##"1. indented code + + paragraph + + more code +"##; + let expected = r##"<ol> +<li> +<pre><code>indented code +</code></pre> +<p>paragraph</p> +<pre><code>more code +</code></pre> +</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_274() { + let original = r##"1. indented code + + paragraph + + more code +"##; + let expected = r##"<ol> +<li> +<pre><code> indented code +</code></pre> +<p>paragraph</p> +<pre><code>more code +</code></pre> +</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_275() { + let original = r##" foo + +bar +"##; + let expected = r##"<p>foo</p> +<p>bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_276() { + let original = r##"- foo + + bar +"##; + let expected = r##"<ul> +<li>foo</li> +</ul> +<p>bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_277() { + let original = r##"- foo + + bar +"##; + let expected = r##"<ul> +<li> +<p>foo</p> +<p>bar</p> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_278() { + let original = r##"- + foo +- + ``` + bar + ``` +- + baz +"##; + let expected = r##"<ul> +<li>foo</li> +<li> +<pre><code>bar +</code></pre> +</li> +<li> +<pre><code>baz +</code></pre> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_279() { + let original = r##"- + foo +"##; + let expected = r##"<ul> +<li>foo</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_280() { + let original = r##"- + + foo +"##; + let expected = r##"<ul> +<li></li> +</ul> +<p>foo</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_281() { + let original = r##"- foo +- +- bar +"##; + let expected = r##"<ul> +<li>foo</li> +<li></li> +<li>bar</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_282() { + let original = r##"- foo +- +- bar +"##; + let expected = r##"<ul> +<li>foo</li> +<li></li> +<li>bar</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_283() { + let original = r##"1. foo +2. +3. bar +"##; + let expected = r##"<ol> +<li>foo</li> +<li></li> +<li>bar</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_284() { + let original = r##"* +"##; + let expected = r##"<ul> +<li></li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_285() { + let original = r##"foo +* + +foo +1. +"##; + let expected = r##"<p>foo +*</p> +<p>foo +1.</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_286() { + let original = r##" 1. A paragraph + with two lines. + + indented code + + > A block quote. +"##; + let expected = r##"<ol> +<li> +<p>A paragraph +with two lines.</p> +<pre><code>indented code +</code></pre> +<blockquote> +<p>A block quote.</p> +</blockquote> +</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_287() { + let original = r##" 1. A paragraph + with two lines. + + indented code + + > A block quote. +"##; + let expected = r##"<ol> +<li> +<p>A paragraph +with two lines.</p> +<pre><code>indented code +</code></pre> +<blockquote> +<p>A block quote.</p> +</blockquote> +</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_288() { + let original = r##" 1. A paragraph + with two lines. + + indented code + + > A block quote. +"##; + let expected = r##"<ol> +<li> +<p>A paragraph +with two lines.</p> +<pre><code>indented code +</code></pre> +<blockquote> +<p>A block quote.</p> +</blockquote> +</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_289() { + let original = r##" 1. A paragraph + with two lines. + + indented code + + > A block quote. +"##; + let expected = r##"<pre><code>1. A paragraph + with two lines. + + indented code + + > A block quote. +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_290() { + let original = r##" 1. A paragraph +with two lines. + + indented code + + > A block quote. +"##; + let expected = r##"<ol> +<li> +<p>A paragraph +with two lines.</p> +<pre><code>indented code +</code></pre> +<blockquote> +<p>A block quote.</p> +</blockquote> +</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_291() { + let original = r##" 1. A paragraph + with two lines. +"##; + let expected = r##"<ol> +<li>A paragraph +with two lines.</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_292() { + let original = r##"> 1. > Blockquote +continued here. +"##; + let expected = r##"<blockquote> +<ol> +<li> +<blockquote> +<p>Blockquote +continued here.</p> +</blockquote> +</li> +</ol> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_293() { + let original = r##"> 1. > Blockquote +> continued here. +"##; + let expected = r##"<blockquote> +<ol> +<li> +<blockquote> +<p>Blockquote +continued here.</p> +</blockquote> +</li> +</ol> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_294() { + let original = r##"- foo + - bar + - baz + - boo +"##; + let expected = r##"<ul> +<li>foo +<ul> +<li>bar +<ul> +<li>baz +<ul> +<li>boo</li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_295() { + let original = r##"- foo + - bar + - baz + - boo +"##; + let expected = r##"<ul> +<li>foo</li> +<li>bar</li> +<li>baz</li> +<li>boo</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_296() { + let original = r##"10) foo + - bar +"##; + let expected = r##"<ol start="10"> +<li>foo +<ul> +<li>bar</li> +</ul> +</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_297() { + let original = r##"10) foo + - bar +"##; + let expected = r##"<ol start="10"> +<li>foo</li> +</ol> +<ul> +<li>bar</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_298() { + let original = r##"- - foo +"##; + let expected = r##"<ul> +<li> +<ul> +<li>foo</li> +</ul> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_299() { + let original = r##"1. - 2. foo +"##; + let expected = r##"<ol> +<li> +<ul> +<li> +<ol start="2"> +<li>foo</li> +</ol> +</li> +</ul> +</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_300() { + let original = r##"- # Foo +- Bar + --- + baz +"##; + let expected = r##"<ul> +<li> +<h1>Foo</h1> +</li> +<li> +<h2>Bar</h2> +baz</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_301() { + let original = r##"- foo +- bar ++ baz +"##; + let expected = r##"<ul> +<li>foo</li> +<li>bar</li> +</ul> +<ul> +<li>baz</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_302() { + let original = r##"1. foo +2. bar +3) baz +"##; + let expected = r##"<ol> +<li>foo</li> +<li>bar</li> +</ol> +<ol start="3"> +<li>baz</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_303() { + let original = r##"Foo +- bar +- baz +"##; + let expected = r##"<p>Foo</p> +<ul> +<li>bar</li> +<li>baz</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_304() { + let original = r##"The number of windows in my house is +14. The number of doors is 6. +"##; + let expected = r##"<p>The number of windows in my house is +14. The number of doors is 6.</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_305() { + let original = r##"The number of windows in my house is +1. The number of doors is 6. +"##; + let expected = r##"<p>The number of windows in my house is</p> +<ol> +<li>The number of doors is 6.</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_306() { + let original = r##"- foo + +- bar + + +- baz +"##; + let expected = r##"<ul> +<li> +<p>foo</p> +</li> +<li> +<p>bar</p> +</li> +<li> +<p>baz</p> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_307() { + let original = r##"- foo + - bar + - baz + + + bim +"##; + let expected = r##"<ul> +<li>foo +<ul> +<li>bar +<ul> +<li> +<p>baz</p> +<p>bim</p> +</li> +</ul> +</li> +</ul> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_308() { + let original = r##"- foo +- bar + +<!-- --> + +- baz +- bim +"##; + let expected = r##"<ul> +<li>foo</li> +<li>bar</li> +</ul> +<!-- --> +<ul> +<li>baz</li> +<li>bim</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_309() { + let original = r##"- foo + + notcode + +- foo + +<!-- --> + + code +"##; + let expected = r##"<ul> +<li> +<p>foo</p> +<p>notcode</p> +</li> +<li> +<p>foo</p> +</li> +</ul> +<!-- --> +<pre><code>code +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_310() { + let original = r##"- a + - b + - c + - d + - e + - f +- g +"##; + let expected = r##"<ul> +<li>a</li> +<li>b</li> +<li>c</li> +<li>d</li> +<li>e</li> +<li>f</li> +<li>g</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_311() { + let original = r##"1. a + + 2. b + + 3. c +"##; + let expected = r##"<ol> +<li> +<p>a</p> +</li> +<li> +<p>b</p> +</li> +<li> +<p>c</p> +</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_312() { + let original = r##"- a + - b + - c + - d + - e +"##; + let expected = r##"<ul> +<li>a</li> +<li>b</li> +<li>c</li> +<li>d +- e</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_313() { + let original = r##"1. a + + 2. b + + 3. c +"##; + let expected = r##"<ol> +<li> +<p>a</p> +</li> +<li> +<p>b</p> +</li> +</ol> +<pre><code>3. c +</code></pre> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_314() { + let original = r##"- a +- b + +- c +"##; + let expected = r##"<ul> +<li> +<p>a</p> +</li> +<li> +<p>b</p> +</li> +<li> +<p>c</p> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_315() { + let original = r##"* a +* + +* c +"##; + let expected = r##"<ul> +<li> +<p>a</p> +</li> +<li></li> +<li> +<p>c</p> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_316() { + let original = r##"- a +- b + + c +- d +"##; + let expected = r##"<ul> +<li> +<p>a</p> +</li> +<li> +<p>b</p> +<p>c</p> +</li> +<li> +<p>d</p> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_317() { + let original = r##"- a +- b + + [ref]: /url +- d +"##; + let expected = r##"<ul> +<li> +<p>a</p> +</li> +<li> +<p>b</p> +</li> +<li> +<p>d</p> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_318() { + let original = r##"- a +- ``` + b + + + ``` +- c +"##; + let expected = r##"<ul> +<li>a</li> +<li> +<pre><code>b + + +</code></pre> +</li> +<li>c</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_319() { + let original = r##"- a + - b + + c +- d +"##; + let expected = r##"<ul> +<li>a +<ul> +<li> +<p>b</p> +<p>c</p> +</li> +</ul> +</li> +<li>d</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_320() { + let original = r##"* a + > b + > +* c +"##; + let expected = r##"<ul> +<li>a +<blockquote> +<p>b</p> +</blockquote> +</li> +<li>c</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_321() { + let original = r##"- a + > b + ``` + c + ``` +- d +"##; + let expected = r##"<ul> +<li>a +<blockquote> +<p>b</p> +</blockquote> +<pre><code>c +</code></pre> +</li> +<li>d</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_322() { + let original = r##"- a +"##; + let expected = r##"<ul> +<li>a</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_323() { + let original = r##"- a + - b +"##; + let expected = r##"<ul> +<li>a +<ul> +<li>b</li> +</ul> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_324() { + let original = r##"1. ``` + foo + ``` + + bar +"##; + let expected = r##"<ol> +<li> +<pre><code>foo +</code></pre> +<p>bar</p> +</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_325() { + let original = r##"* foo + * bar + + baz +"##; + let expected = r##"<ul> +<li> +<p>foo</p> +<ul> +<li>bar</li> +</ul> +<p>baz</p> +</li> +</ul> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_326() { + let original = r##"- a + - b + - c + +- d + - e + - f +"##; + let expected = 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> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_327() { + let original = r##"`hi`lo` +"##; + let expected = r##"<p><code>hi</code>lo`</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_328() { + let original = r##"`foo` +"##; + let expected = r##"<p><code>foo</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_329() { + let original = r##"`` foo ` bar `` +"##; + let expected = r##"<p><code>foo ` bar</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_330() { + let original = r##"` `` ` +"##; + let expected = r##"<p><code>``</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_331() { + let original = r##"` `` ` +"##; + let expected = r##"<p><code> `` </code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_332() { + let original = r##"` a` +"##; + let expected = r##"<p><code> a</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_333() { + let original = r##"` b ` +"##; + let expected = r##"<p><code> b </code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_334() { + let original = r##"` ` +` ` +"##; + let expected = r##"<p><code> </code> +<code> </code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_335() { + let original = r##"`` +foo +bar +baz +`` +"##; + let expected = r##"<p><code>foo bar baz</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_336() { + let original = r##"`` +foo +`` +"##; + let expected = r##"<p><code>foo </code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_337() { + let original = r##"`foo bar +baz` +"##; + let expected = r##"<p><code>foo bar baz</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_338() { + let original = r##"`foo\`bar` +"##; + let expected = r##"<p><code>foo\</code>bar`</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_339() { + let original = r##"``foo`bar`` +"##; + let expected = r##"<p><code>foo`bar</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_340() { + let original = r##"` foo `` bar ` +"##; + let expected = r##"<p><code>foo `` bar</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_341() { + let original = r##"*foo`*` +"##; + let expected = r##"<p>*foo<code>*</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_342() { + let original = r##"[not a `link](/foo`) +"##; + let expected = r##"<p>[not a <code>link](/foo</code>)</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_343() { + let original = r##"`<a href="`">` +"##; + let expected = r##"<p><code><a href="</code>">`</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_344() { + let original = r##"<a href="`">` +"##; + let expected = r##"<p><a href="`">`</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_345() { + let original = r##"`<http://foo.bar.`baz>` +"##; + let expected = r##"<p><code><http://foo.bar.</code>baz>`</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_346() { + let original = r##"<http://foo.bar.`baz>` +"##; + let expected = r##"<p><a href="http://foo.bar.%60baz">http://foo.bar.`baz</a>`</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_347() { + let original = r##"```foo`` +"##; + let expected = r##"<p>```foo``</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_348() { + let original = r##"`foo +"##; + let expected = r##"<p>`foo</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_349() { + let original = r##"`foo``bar`` +"##; + let expected = r##"<p>`foo<code>bar</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_350() { + let original = r##"*foo bar* +"##; + let expected = r##"<p><em>foo bar</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_351() { + let original = r##"a * foo bar* +"##; + let expected = r##"<p>a * foo bar*</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_352() { + let original = r##"a*"foo"* +"##; + let expected = r##"<p>a*"foo"*</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_353() { + let original = r##"* a * +"##; + let expected = r##"<p>* a *</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_354() { + let original = r##"foo*bar* +"##; + let expected = r##"<p>foo<em>bar</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_355() { + let original = r##"5*6*78 +"##; + let expected = r##"<p>5<em>6</em>78</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_356() { + let original = r##"_foo bar_ +"##; + let expected = r##"<p><em>foo bar</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_357() { + let original = r##"_ foo bar_ +"##; + let expected = r##"<p>_ foo bar_</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_358() { + let original = r##"a_"foo"_ +"##; + let expected = r##"<p>a_"foo"_</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_359() { + let original = r##"foo_bar_ +"##; + let expected = r##"<p>foo_bar_</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_360() { + let original = r##"5_6_78 +"##; + let expected = r##"<p>5_6_78</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_361() { + let original = r##"пристаням_стремятся_ +"##; + let expected = r##"<p>пристаням_стремятся_</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_362() { + let original = r##"aa_"bb"_cc +"##; + let expected = r##"<p>aa_"bb"_cc</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_363() { + let original = r##"foo-_(bar)_ +"##; + let expected = r##"<p>foo-<em>(bar)</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_364() { + let original = r##"_foo* +"##; + let expected = r##"<p>_foo*</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_365() { + let original = r##"*foo bar * +"##; + let expected = r##"<p>*foo bar *</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_366() { + let original = r##"*foo bar +* +"##; + let expected = r##"<p>*foo bar +*</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_367() { + let original = r##"*(*foo) +"##; + let expected = r##"<p>*(*foo)</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_368() { + let original = r##"*(*foo*)* +"##; + let expected = r##"<p><em>(<em>foo</em>)</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_369() { + let original = r##"*foo*bar +"##; + let expected = r##"<p><em>foo</em>bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_370() { + let original = r##"_foo bar _ +"##; + let expected = r##"<p>_foo bar _</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_371() { + let original = r##"_(_foo) +"##; + let expected = r##"<p>_(_foo)</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_372() { + let original = r##"_(_foo_)_ +"##; + let expected = r##"<p><em>(<em>foo</em>)</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_373() { + let original = r##"_foo_bar +"##; + let expected = r##"<p>_foo_bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_374() { + let original = r##"_пристаням_стремятся +"##; + let expected = r##"<p>_пристаням_стремятся</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_375() { + let original = r##"_foo_bar_baz_ +"##; + let expected = r##"<p><em>foo_bar_baz</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_376() { + let original = r##"_(bar)_. +"##; + let expected = r##"<p><em>(bar)</em>.</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_377() { + let original = r##"**foo bar** +"##; + let expected = r##"<p><strong>foo bar</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_378() { + let original = r##"** foo bar** +"##; + let expected = r##"<p>** foo bar**</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_379() { + let original = r##"a**"foo"** +"##; + let expected = r##"<p>a**"foo"**</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_380() { + let original = r##"foo**bar** +"##; + let expected = r##"<p>foo<strong>bar</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_381() { + let original = r##"__foo bar__ +"##; + let expected = r##"<p><strong>foo bar</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_382() { + let original = r##"__ foo bar__ +"##; + let expected = r##"<p>__ foo bar__</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_383() { + let original = r##"__ +foo bar__ +"##; + let expected = r##"<p>__ +foo bar__</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_384() { + let original = r##"a__"foo"__ +"##; + let expected = r##"<p>a__"foo"__</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_385() { + let original = r##"foo__bar__ +"##; + let expected = r##"<p>foo__bar__</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_386() { + let original = r##"5__6__78 +"##; + let expected = r##"<p>5__6__78</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_387() { + let original = r##"пристаням__стремятся__ +"##; + let expected = r##"<p>пристаням__стремятся__</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_388() { + let original = r##"__foo, __bar__, baz__ +"##; + let expected = r##"<p><strong>foo, <strong>bar</strong>, baz</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_389() { + let original = r##"foo-__(bar)__ +"##; + let expected = r##"<p>foo-<strong>(bar)</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_390() { + let original = r##"**foo bar ** +"##; + let expected = r##"<p>**foo bar **</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_391() { + let original = r##"**(**foo) +"##; + let expected = r##"<p>**(**foo)</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_392() { + let original = r##"*(**foo**)* +"##; + let expected = r##"<p><em>(<strong>foo</strong>)</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_393() { + let original = r##"**Gomphocarpus (*Gomphocarpus physocarpus*, syn. +*Asclepias physocarpa*)** +"##; + let expected = r##"<p><strong>Gomphocarpus (<em>Gomphocarpus physocarpus</em>, syn. +<em>Asclepias physocarpa</em>)</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_394() { + let original = r##"**foo "*bar*" foo** +"##; + let expected = r##"<p><strong>foo "<em>bar</em>" foo</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_395() { + let original = r##"**foo**bar +"##; + let expected = r##"<p><strong>foo</strong>bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_396() { + let original = r##"__foo bar __ +"##; + let expected = r##"<p>__foo bar __</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_397() { + let original = r##"__(__foo) +"##; + let expected = r##"<p>__(__foo)</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_398() { + let original = r##"_(__foo__)_ +"##; + let expected = r##"<p><em>(<strong>foo</strong>)</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_399() { + let original = r##"__foo__bar +"##; + let expected = r##"<p>__foo__bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_400() { + let original = r##"__пристаням__стремятся +"##; + let expected = r##"<p>__пристаням__стремятся</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_401() { + let original = r##"__foo__bar__baz__ +"##; + let expected = r##"<p><strong>foo__bar__baz</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_402() { + let original = r##"__(bar)__. +"##; + let expected = r##"<p><strong>(bar)</strong>.</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_403() { + let original = r##"*foo [bar](/url)* +"##; + let expected = r##"<p><em>foo <a href="/url">bar</a></em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_404() { + let original = r##"*foo +bar* +"##; + let expected = r##"<p><em>foo +bar</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_405() { + let original = r##"_foo __bar__ baz_ +"##; + let expected = r##"<p><em>foo <strong>bar</strong> baz</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_406() { + let original = r##"_foo _bar_ baz_ +"##; + let expected = r##"<p><em>foo <em>bar</em> baz</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_407() { + let original = r##"__foo_ bar_ +"##; + let expected = r##"<p><em><em>foo</em> bar</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_408() { + let original = r##"*foo *bar** +"##; + let expected = r##"<p><em>foo <em>bar</em></em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_409() { + let original = r##"*foo **bar** baz* +"##; + let expected = r##"<p><em>foo <strong>bar</strong> baz</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_410() { + let original = r##"*foo**bar**baz* +"##; + let expected = r##"<p><em>foo<strong>bar</strong>baz</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_411() { + let original = r##"*foo**bar* +"##; + let expected = r##"<p><em>foo**bar</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_412() { + let original = r##"***foo** bar* +"##; + let expected = r##"<p><em><strong>foo</strong> bar</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_413() { + let original = r##"*foo **bar*** +"##; + let expected = r##"<p><em>foo <strong>bar</strong></em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_414() { + let original = r##"*foo**bar*** +"##; + let expected = r##"<p><em>foo<strong>bar</strong></em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_415() { + let original = r##"foo***bar***baz +"##; + let expected = r##"<p>foo<em><strong>bar</strong></em>baz</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_416() { + let original = r##"foo******bar*********baz +"##; + let expected = r##"<p>foo<strong><strong><strong>bar</strong></strong></strong>***baz</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_417() { + let original = r##"*foo **bar *baz* bim** bop* +"##; + let expected = r##"<p><em>foo <strong>bar <em>baz</em> bim</strong> bop</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_418() { + let original = r##"*foo [*bar*](/url)* +"##; + let expected = r##"<p><em>foo <a href="/url"><em>bar</em></a></em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_419() { + let original = r##"** is not an empty emphasis +"##; + let expected = r##"<p>** is not an empty emphasis</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_420() { + let original = r##"**** is not an empty strong emphasis +"##; + let expected = r##"<p>**** is not an empty strong emphasis</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_421() { + let original = r##"**foo [bar](/url)** +"##; + let expected = r##"<p><strong>foo <a href="/url">bar</a></strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_422() { + let original = r##"**foo +bar** +"##; + let expected = r##"<p><strong>foo +bar</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_423() { + let original = r##"__foo _bar_ baz__ +"##; + let expected = r##"<p><strong>foo <em>bar</em> baz</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_424() { + let original = r##"__foo __bar__ baz__ +"##; + let expected = r##"<p><strong>foo <strong>bar</strong> baz</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_425() { + let original = r##"____foo__ bar__ +"##; + let expected = r##"<p><strong><strong>foo</strong> bar</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_426() { + let original = r##"**foo **bar**** +"##; + let expected = r##"<p><strong>foo <strong>bar</strong></strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_427() { + let original = r##"**foo *bar* baz** +"##; + let expected = r##"<p><strong>foo <em>bar</em> baz</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_428() { + let original = r##"**foo*bar*baz** +"##; + let expected = r##"<p><strong>foo<em>bar</em>baz</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_429() { + let original = r##"***foo* bar** +"##; + let expected = r##"<p><strong><em>foo</em> bar</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_430() { + let original = r##"**foo *bar*** +"##; + let expected = r##"<p><strong>foo <em>bar</em></strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_431() { + let original = r##"**foo *bar **baz** +bim* bop** +"##; + let expected = r##"<p><strong>foo <em>bar <strong>baz</strong> +bim</em> bop</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_432() { + let original = r##"**foo [*bar*](/url)** +"##; + let expected = r##"<p><strong>foo <a href="/url"><em>bar</em></a></strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_433() { + let original = r##"__ is not an empty emphasis +"##; + let expected = r##"<p>__ is not an empty emphasis</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_434() { + let original = r##"____ is not an empty strong emphasis +"##; + let expected = r##"<p>____ is not an empty strong emphasis</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_435() { + let original = r##"foo *** +"##; + let expected = r##"<p>foo ***</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_436() { + let original = r##"foo *\** +"##; + let expected = r##"<p>foo <em>*</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_437() { + let original = r##"foo *_* +"##; + let expected = r##"<p>foo <em>_</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_438() { + let original = r##"foo ***** +"##; + let expected = r##"<p>foo *****</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_439() { + let original = r##"foo **\*** +"##; + let expected = r##"<p>foo <strong>*</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_440() { + let original = r##"foo **_** +"##; + let expected = r##"<p>foo <strong>_</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_441() { + let original = r##"**foo* +"##; + let expected = r##"<p>*<em>foo</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_442() { + let original = r##"*foo** +"##; + let expected = r##"<p><em>foo</em>*</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_443() { + let original = r##"***foo** +"##; + let expected = r##"<p>*<strong>foo</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_444() { + let original = r##"****foo* +"##; + let expected = r##"<p>***<em>foo</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_445() { + let original = r##"**foo*** +"##; + let expected = r##"<p><strong>foo</strong>*</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_446() { + let original = r##"*foo**** +"##; + let expected = r##"<p><em>foo</em>***</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_447() { + let original = r##"foo ___ +"##; + let expected = r##"<p>foo ___</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_448() { + let original = r##"foo _\__ +"##; + let expected = r##"<p>foo <em>_</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_449() { + let original = r##"foo _*_ +"##; + let expected = r##"<p>foo <em>*</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_450() { + let original = r##"foo _____ +"##; + let expected = r##"<p>foo _____</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_451() { + let original = r##"foo __\___ +"##; + let expected = r##"<p>foo <strong>_</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_452() { + let original = r##"foo __*__ +"##; + let expected = r##"<p>foo <strong>*</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_453() { + let original = r##"__foo_ +"##; + let expected = r##"<p>_<em>foo</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_454() { + let original = r##"_foo__ +"##; + let expected = r##"<p><em>foo</em>_</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_455() { + let original = r##"___foo__ +"##; + let expected = r##"<p>_<strong>foo</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_456() { + let original = r##"____foo_ +"##; + let expected = r##"<p>___<em>foo</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_457() { + let original = r##"__foo___ +"##; + let expected = r##"<p><strong>foo</strong>_</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_458() { + let original = r##"_foo____ +"##; + let expected = r##"<p><em>foo</em>___</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_459() { + let original = r##"**foo** +"##; + let expected = r##"<p><strong>foo</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_460() { + let original = r##"*_foo_* +"##; + let expected = r##"<p><em><em>foo</em></em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_461() { + let original = r##"__foo__ +"##; + let expected = r##"<p><strong>foo</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_462() { + let original = r##"_*foo*_ +"##; + let expected = r##"<p><em><em>foo</em></em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_463() { + let original = r##"****foo**** +"##; + let expected = r##"<p><strong><strong>foo</strong></strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_464() { + let original = r##"____foo____ +"##; + let expected = r##"<p><strong><strong>foo</strong></strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_465() { + let original = r##"******foo****** +"##; + let expected = r##"<p><strong><strong><strong>foo</strong></strong></strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_466() { + let original = r##"***foo*** +"##; + let expected = r##"<p><em><strong>foo</strong></em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_467() { + let original = r##"_____foo_____ +"##; + let expected = r##"<p><em><strong><strong>foo</strong></strong></em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_468() { + let original = r##"*foo _bar* baz_ +"##; + let expected = r##"<p><em>foo _bar</em> baz_</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_469() { + let original = r##"*foo __bar *baz bim__ bam* +"##; + let expected = r##"<p><em>foo <strong>bar *baz bim</strong> bam</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_470() { + let original = r##"**foo **bar baz** +"##; + let expected = r##"<p>**foo <strong>bar baz</strong></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_471() { + let original = r##"*foo *bar baz* +"##; + let expected = r##"<p>*foo <em>bar baz</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_472() { + let original = r##"*[bar*](/url) +"##; + let expected = r##"<p>*<a href="/url">bar*</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_473() { + let original = r##"_foo [bar_](/url) +"##; + let expected = r##"<p>_foo <a href="/url">bar_</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_474() { + let original = r##"*<img src="foo" title="*"/> +"##; + let expected = r##"<p>*<img src="foo" title="*"/></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_475() { + let original = r##"**<a href="**"> +"##; + let expected = r##"<p>**<a href="**"></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_476() { + let original = r##"__<a href="__"> +"##; + let expected = r##"<p>__<a href="__"></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_477() { + let original = r##"*a `*`* +"##; + let expected = r##"<p><em>a <code>*</code></em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_478() { + let original = r##"_a `_`_ +"##; + let expected = r##"<p><em>a <code>_</code></em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_479() { + let original = r##"**a<http://foo.bar/?q=**> +"##; + let expected = r##"<p>**a<a href="http://foo.bar/?q=**">http://foo.bar/?q=**</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_480() { + let original = r##"__a<http://foo.bar/?q=__> +"##; + let expected = r##"<p>__a<a href="http://foo.bar/?q=__">http://foo.bar/?q=__</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_481() { + let original = r##"[link](/uri "title") +"##; + let expected = r##"<p><a href="/uri" title="title">link</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_482() { + let original = r##"[link](/uri) +"##; + let expected = r##"<p><a href="/uri">link</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_483() { + let original = r##"[](./target.md) +"##; + let expected = r##"<p><a href="./target.md"></a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_484() { + let original = r##"[link]() +"##; + let expected = r##"<p><a href="">link</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_485() { + let original = r##"[link](<>) +"##; + let expected = r##"<p><a href="">link</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_486() { + let original = r##"[]() +"##; + let expected = r##"<p><a href=""></a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_487() { + let original = r##"[link](/my uri) +"##; + let expected = r##"<p>[link](/my uri)</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_488() { + let original = r##"[link](</my uri>) +"##; + let expected = r##"<p><a href="/my%20uri">link</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_489() { + let original = r##"[link](foo +bar) +"##; + let expected = r##"<p>[link](foo +bar)</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_490() { + let original = r##"[link](<foo +bar>) +"##; + let expected = r##"<p>[link](<foo +bar>)</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_491() { + let original = r##"[a](<b)c>) +"##; + let expected = r##"<p><a href="b)c">a</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_492() { + let original = r##"[link](<foo\>) +"##; + let expected = r##"<p>[link](<foo>)</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_493() { + let original = r##"[a](<b)c +[a](<b)c> +[a](<b>c) +"##; + let expected = r##"<p>[a](<b)c +[a](<b)c> +[a](<b>c)</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_494() { + let original = r##"[link](\(foo\)) +"##; + let expected = r##"<p><a href="(foo)">link</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_495() { + let original = r##"[link](foo(and(bar))) +"##; + let expected = r##"<p><a href="foo(and(bar))">link</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_496() { + let original = r##"[link](foo(and(bar)) +"##; + let expected = r##"<p>[link](foo(and(bar))</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_497() { + let original = r##"[link](foo\(and\(bar\)) +"##; + let expected = r##"<p><a href="foo(and(bar)">link</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_498() { + let original = r##"[link](<foo(and(bar)>) +"##; + let expected = r##"<p><a href="foo(and(bar)">link</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_499() { + let original = r##"[link](foo\)\:) +"##; + let expected = r##"<p><a href="foo):">link</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_500() { + let original = r##"[link](#fragment) + +[link](http://example.com#fragment) + +[link](http://example.com?foo=3#frag) +"##; + let expected = 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> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_501() { + let original = r##"[link](foo\bar) +"##; + let expected = r##"<p><a href="foo%5Cbar">link</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_502() { + let original = r##"[link](foo%20bä) +"##; + let expected = r##"<p><a href="foo%20b%C3%A4">link</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_503() { + let original = r##"[link]("title") +"##; + let expected = r##"<p><a href="%22title%22">link</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_504() { + let original = r##"[link](/url "title") +[link](/url 'title') +[link](/url (title)) +"##; + let expected = r##"<p><a href="/url" title="title">link</a> +<a href="/url" title="title">link</a> +<a href="/url" title="title">link</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_505() { + let original = r##"[link](/url "title \""") +"##; + let expected = r##"<p><a href="/url" title="title """>link</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_506() { + let original = r##"[link](/url "title") +"##; + let expected = r##"<p><a href="/url%C2%A0%22title%22">link</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_507() { + let original = r##"[link](/url "title "and" title") +"##; + let expected = r##"<p>[link](/url "title "and" title")</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_508() { + let original = r##"[link](/url 'title "and" title') +"##; + let expected = r##"<p><a href="/url" title="title "and" title">link</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_509() { + let original = r##"[link]( /uri + "title" ) +"##; + let expected = r##"<p><a href="/uri" title="title">link</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_510() { + let original = r##"[link] (/uri) +"##; + let expected = r##"<p>[link] (/uri)</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_511() { + let original = r##"[link [foo [bar]]](/uri) +"##; + let expected = r##"<p><a href="/uri">link [foo [bar]]</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_512() { + let original = r##"[link] bar](/uri) +"##; + let expected = r##"<p>[link] bar](/uri)</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_513() { + let original = r##"[link [bar](/uri) +"##; + let expected = r##"<p>[link <a href="/uri">bar</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_514() { + let original = r##"[link \[bar](/uri) +"##; + let expected = r##"<p><a href="/uri">link [bar</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_515() { + let original = r##"[link *foo **bar** `#`*](/uri) +"##; + let expected = r##"<p><a href="/uri">link <em>foo <strong>bar</strong> <code>#</code></em></a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_516() { + let original = r##"[![moon](moon.jpg)](/uri) +"##; + let expected = r##"<p><a href="/uri"><img src="moon.jpg" alt="moon" /></a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_517() { + let original = r##"[foo [bar](/uri)](/uri) +"##; + let expected = r##"<p>[foo <a href="/uri">bar</a>](/uri)</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_518() { + let original = r##"[foo *[bar [baz](/uri)](/uri)*](/uri) +"##; + let expected = r##"<p>[foo <em>[bar <a href="/uri">baz</a>](/uri)</em>](/uri)</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_519() { + let original = r##"![[[foo](uri1)](uri2)](uri3) +"##; + let expected = r##"<p><img src="uri3" alt="[foo](uri2)" /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_520() { + let original = r##"*[foo*](/uri) +"##; + let expected = r##"<p>*<a href="/uri">foo*</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_521() { + let original = r##"[foo *bar](baz*) +"##; + let expected = r##"<p><a href="baz*">foo *bar</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_522() { + let original = r##"*foo [bar* baz] +"##; + let expected = r##"<p><em>foo [bar</em> baz]</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_523() { + let original = r##"[foo <bar attr="](baz)"> +"##; + let expected = r##"<p>[foo <bar attr="](baz)"></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_524() { + let original = r##"[foo`](/uri)` +"##; + let expected = r##"<p>[foo<code>](/uri)</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_525() { + let original = r##"[foo<http://example.com/?search=](uri)> +"##; + let expected = r##"<p>[foo<a href="http://example.com/?search=%5D(uri)">http://example.com/?search=](uri)</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_526() { + let original = r##"[foo][bar] + +[bar]: /url "title" +"##; + let expected = r##"<p><a href="/url" title="title">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_527() { + let original = r##"[link [foo [bar]]][ref] + +[ref]: /uri +"##; + let expected = r##"<p><a href="/uri">link [foo [bar]]</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_528() { + let original = r##"[link \[bar][ref] + +[ref]: /uri +"##; + let expected = r##"<p><a href="/uri">link [bar</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_529() { + let original = r##"[link *foo **bar** `#`*][ref] + +[ref]: /uri +"##; + let expected = r##"<p><a href="/uri">link <em>foo <strong>bar</strong> <code>#</code></em></a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_530() { + let original = r##"[![moon](moon.jpg)][ref] + +[ref]: /uri +"##; + let expected = r##"<p><a href="/uri"><img src="moon.jpg" alt="moon" /></a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_531() { + let original = r##"[foo [bar](/uri)][ref] + +[ref]: /uri +"##; + let expected = r##"<p>[foo <a href="/uri">bar</a>]<a href="/uri">ref</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_532() { + let original = r##"[foo *bar [baz][ref]*][ref] + +[ref]: /uri +"##; + let expected = r##"<p>[foo <em>bar <a href="/uri">baz</a></em>]<a href="/uri">ref</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_533() { + let original = r##"*[foo*][ref] + +[ref]: /uri +"##; + let expected = r##"<p>*<a href="/uri">foo*</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_534() { + let original = r##"[foo *bar][ref]* + +[ref]: /uri +"##; + let expected = r##"<p><a href="/uri">foo *bar</a>*</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_535() { + let original = r##"[foo <bar attr="][ref]"> + +[ref]: /uri +"##; + let expected = r##"<p>[foo <bar attr="][ref]"></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_536() { + let original = r##"[foo`][ref]` + +[ref]: /uri +"##; + let expected = r##"<p>[foo<code>][ref]</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_537() { + let original = r##"[foo<http://example.com/?search=][ref]> + +[ref]: /uri +"##; + let expected = r##"<p>[foo<a href="http://example.com/?search=%5D%5Bref%5D">http://example.com/?search=][ref]</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_538() { + let original = r##"[foo][BaR] + +[bar]: /url "title" +"##; + let expected = r##"<p><a href="/url" title="title">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_539() { + let original = r##"[ẞ] + +[SS]: /url +"##; + let expected = r##"<p><a href="/url">ẞ</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_540() { + let original = r##"[Foo + bar]: /url + +[Baz][Foo bar] +"##; + let expected = r##"<p><a href="/url">Baz</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_541() { + let original = r##"[foo] [bar] + +[bar]: /url "title" +"##; + let expected = r##"<p>[foo] <a href="/url" title="title">bar</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_542() { + let original = r##"[foo] +[bar] + +[bar]: /url "title" +"##; + let expected = r##"<p>[foo] +<a href="/url" title="title">bar</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_543() { + let original = r##"[foo]: /url1 + +[foo]: /url2 + +[bar][foo] +"##; + let expected = r##"<p><a href="/url1">bar</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_544() { + let original = r##"[bar][foo\!] + +[foo!]: /url +"##; + let expected = r##"<p>[bar][foo!]</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_545() { + let original = r##"[foo][ref[] + +[ref[]: /uri +"##; + let expected = r##"<p>[foo][ref[]</p> +<p>[ref[]: /uri</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_546() { + let original = r##"[foo][ref[bar]] + +[ref[bar]]: /uri +"##; + let expected = r##"<p>[foo][ref[bar]]</p> +<p>[ref[bar]]: /uri</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_547() { + let original = r##"[[[foo]]] + +[[[foo]]]: /url +"##; + let expected = r##"<p>[[[foo]]]</p> +<p>[[[foo]]]: /url</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_548() { + let original = r##"[foo][ref\[] + +[ref\[]: /uri +"##; + let expected = r##"<p><a href="/uri">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_549() { + let original = r##"[bar\\]: /uri + +[bar\\] +"##; + let expected = r##"<p><a href="/uri">bar\</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_550() { + let original = r##"[] + +[]: /uri +"##; + let expected = r##"<p>[]</p> +<p>[]: /uri</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_551() { + let original = r##"[ + ] + +[ + ]: /uri +"##; + let expected = r##"<p>[ +]</p> +<p>[ +]: /uri</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_552() { + let original = r##"[foo][] + +[foo]: /url "title" +"##; + let expected = r##"<p><a href="/url" title="title">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_553() { + let original = r##"[*foo* bar][] + +[*foo* bar]: /url "title" +"##; + let expected = r##"<p><a href="/url" title="title"><em>foo</em> bar</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_554() { + let original = r##"[Foo][] + +[foo]: /url "title" +"##; + let expected = r##"<p><a href="/url" title="title">Foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_555() { + let original = r##"[foo] +[] + +[foo]: /url "title" +"##; + let expected = r##"<p><a href="/url" title="title">foo</a> +[]</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_556() { + let original = r##"[foo] + +[foo]: /url "title" +"##; + let expected = r##"<p><a href="/url" title="title">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_557() { + let original = r##"[*foo* bar] + +[*foo* bar]: /url "title" +"##; + let expected = r##"<p><a href="/url" title="title"><em>foo</em> bar</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_558() { + let original = r##"[[*foo* bar]] + +[*foo* bar]: /url "title" +"##; + let expected = r##"<p>[<a href="/url" title="title"><em>foo</em> bar</a>]</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_559() { + let original = r##"[[bar [foo] + +[foo]: /url +"##; + let expected = r##"<p>[[bar <a href="/url">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_560() { + let original = r##"[Foo] + +[foo]: /url "title" +"##; + let expected = r##"<p><a href="/url" title="title">Foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_561() { + let original = r##"[foo] bar + +[foo]: /url +"##; + let expected = r##"<p><a href="/url">foo</a> bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_562() { + let original = r##"\[foo] + +[foo]: /url "title" +"##; + let expected = r##"<p>[foo]</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_563() { + let original = r##"[foo*]: /url + +*[foo*] +"##; + let expected = r##"<p>*<a href="/url">foo*</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_564() { + let original = r##"[foo][bar] + +[foo]: /url1 +[bar]: /url2 +"##; + let expected = r##"<p><a href="/url2">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_565() { + let original = r##"[foo][] + +[foo]: /url1 +"##; + let expected = r##"<p><a href="/url1">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_566() { + let original = r##"[foo]() + +[foo]: /url1 +"##; + let expected = r##"<p><a href="">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_567() { + let original = r##"[foo](not a link) + +[foo]: /url1 +"##; + let expected = r##"<p><a href="/url1">foo</a>(not a link)</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_568() { + let original = r##"[foo][bar][baz] + +[baz]: /url +"##; + let expected = r##"<p>[foo]<a href="/url">bar</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_569() { + let original = r##"[foo][bar][baz] + +[baz]: /url1 +[bar]: /url2 +"##; + let expected = r##"<p><a href="/url2">foo</a><a href="/url1">baz</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_570() { + let original = r##"[foo][bar][baz] + +[baz]: /url1 +[foo]: /url2 +"##; + let expected = r##"<p>[foo]<a href="/url1">bar</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_571() { + let original = r##"![foo](/url "title") +"##; + let expected = r##"<p><img src="/url" alt="foo" title="title" /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_572() { + let original = r##"![foo *bar*] + +[foo *bar*]: train.jpg "train & tracks" +"##; + let expected = r##"<p><img src="train.jpg" alt="foo bar" title="train & tracks" /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_573() { + let original = r##"![foo ![bar](/url)](/url2) +"##; + let expected = r##"<p><img src="/url2" alt="foo bar" /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_574() { + let original = r##"![foo [bar](/url)](/url2) +"##; + let expected = r##"<p><img src="/url2" alt="foo bar" /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_575() { + let original = r##"![foo *bar*][] + +[foo *bar*]: train.jpg "train & tracks" +"##; + let expected = r##"<p><img src="train.jpg" alt="foo bar" title="train & tracks" /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_576() { + let original = r##"![foo *bar*][foobar] + +[FOOBAR]: train.jpg "train & tracks" +"##; + let expected = r##"<p><img src="train.jpg" alt="foo bar" title="train & tracks" /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_577() { + let original = r##"![foo](train.jpg) +"##; + let expected = r##"<p><img src="train.jpg" alt="foo" /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_578() { + let original = r##"My ![foo bar](/path/to/train.jpg "title" ) +"##; + let expected = r##"<p>My <img src="/path/to/train.jpg" alt="foo bar" title="title" /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_579() { + let original = r##"![foo](<url>) +"##; + let expected = r##"<p><img src="url" alt="foo" /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_580() { + let original = r##"![](/url) +"##; + let expected = r##"<p><img src="/url" alt="" /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_581() { + let original = r##"![foo][bar] + +[bar]: /url +"##; + let expected = r##"<p><img src="/url" alt="foo" /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_582() { + let original = r##"![foo][bar] + +[BAR]: /url +"##; + let expected = r##"<p><img src="/url" alt="foo" /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_583() { + let original = r##"![foo][] + +[foo]: /url "title" +"##; + let expected = r##"<p><img src="/url" alt="foo" title="title" /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_584() { + let original = r##"![*foo* bar][] + +[*foo* bar]: /url "title" +"##; + let expected = r##"<p><img src="/url" alt="foo bar" title="title" /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_585() { + let original = r##"![Foo][] + +[foo]: /url "title" +"##; + let expected = r##"<p><img src="/url" alt="Foo" title="title" /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_586() { + let original = r##"![foo] +[] + +[foo]: /url "title" +"##; + let expected = r##"<p><img src="/url" alt="foo" title="title" /> +[]</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_587() { + let original = r##"![foo] + +[foo]: /url "title" +"##; + let expected = r##"<p><img src="/url" alt="foo" title="title" /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_588() { + let original = r##"![*foo* bar] + +[*foo* bar]: /url "title" +"##; + let expected = r##"<p><img src="/url" alt="foo bar" title="title" /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_589() { + let original = r##"![[foo]] + +[[foo]]: /url "title" +"##; + let expected = r##"<p>![[foo]]</p> +<p>[[foo]]: /url "title"</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_590() { + let original = r##"![Foo] + +[foo]: /url "title" +"##; + let expected = r##"<p><img src="/url" alt="Foo" title="title" /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_591() { + let original = r##"!\[foo] + +[foo]: /url "title" +"##; + let expected = r##"<p>![foo]</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_592() { + let original = r##"\![foo] + +[foo]: /url "title" +"##; + let expected = r##"<p>!<a href="/url" title="title">foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_593() { + let original = r##"<http://foo.bar.baz> +"##; + let expected = r##"<p><a href="http://foo.bar.baz">http://foo.bar.baz</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_594() { + let original = r##"<http://foo.bar.baz/test?q=hello&id=22&boolean> +"##; + let expected = 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> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_595() { + let original = r##"<irc://foo.bar:2233/baz> +"##; + let expected = r##"<p><a href="irc://foo.bar:2233/baz">irc://foo.bar:2233/baz</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_596() { + let original = r##"<MAILTO:FOO@BAR.BAZ> +"##; + let expected = r##"<p><a href="MAILTO:FOO@BAR.BAZ">MAILTO:FOO@BAR.BAZ</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_597() { + let original = r##"<a+b+c:d> +"##; + let expected = r##"<p><a href="a+b+c:d">a+b+c:d</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_598() { + let original = r##"<made-up-scheme://foo,bar> +"##; + let expected = r##"<p><a href="made-up-scheme://foo,bar">made-up-scheme://foo,bar</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_599() { + let original = r##"<http://../> +"##; + let expected = r##"<p><a href="http://../">http://../</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_600() { + let original = r##"<localhost:5001/foo> +"##; + let expected = r##"<p><a href="localhost:5001/foo">localhost:5001/foo</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_601() { + let original = r##"<http://foo.bar/baz bim> +"##; + let expected = r##"<p><http://foo.bar/baz bim></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_602() { + let original = r##"<http://example.com/\[\> +"##; + let expected = r##"<p><a href="http://example.com/%5C%5B%5C">http://example.com/\[\</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_603() { + let original = r##"<foo@bar.example.com> +"##; + let expected = r##"<p><a href="mailto:foo@bar.example.com">foo@bar.example.com</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_604() { + let original = r##"<foo+special@Bar.baz-bar0.com> +"##; + let expected = r##"<p><a href="mailto:foo+special@Bar.baz-bar0.com">foo+special@Bar.baz-bar0.com</a></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_605() { + let original = r##"<foo\+@bar.example.com> +"##; + let expected = r##"<p><foo+@bar.example.com></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_606() { + let original = r##"<> +"##; + let expected = r##"<p><></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_607() { + let original = r##"< http://foo.bar > +"##; + let expected = r##"<p>< http://foo.bar ></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_608() { + let original = r##"<m:abc> +"##; + let expected = r##"<p><m:abc></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_609() { + let original = r##"<foo.bar.baz> +"##; + let expected = r##"<p><foo.bar.baz></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_610() { + let original = r##"http://example.com +"##; + let expected = r##"<p>http://example.com</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_611() { + let original = r##"foo@bar.example.com +"##; + let expected = r##"<p>foo@bar.example.com</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_612() { + let original = r##"<a><bab><c2c> +"##; + let expected = r##"<p><a><bab><c2c></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_613() { + let original = r##"<a/><b2/> +"##; + let expected = r##"<p><a/><b2/></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_614() { + let original = r##"<a /><b2 +data="foo" > +"##; + let expected = r##"<p><a /><b2 +data="foo" ></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_615() { + let original = r##"<a foo="bar" bam = 'baz <em>"</em>' +_boolean zoop:33=zoop:33 /> +"##; + let expected = r##"<p><a foo="bar" bam = 'baz <em>"</em>' +_boolean zoop:33=zoop:33 /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_616() { + let original = r##"Foo <responsive-image src="foo.jpg" /> +"##; + let expected = r##"<p>Foo <responsive-image src="foo.jpg" /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_617() { + let original = r##"<33> <__> +"##; + let expected = r##"<p><33> <__></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_618() { + let original = r##"<a h*#ref="hi"> +"##; + let expected = r##"<p><a h*#ref="hi"></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_619() { + let original = r##"<a href="hi'> <a href=hi'> +"##; + let expected = r##"<p><a href="hi'> <a href=hi'></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_620() { + let original = r##"< a>< +foo><bar/ > +<foo bar=baz +bim!bop /> +"##; + let expected = r##"<p>< a>< +foo><bar/ > +<foo bar=baz +bim!bop /></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_621() { + let original = r##"<a href='bar'title=title> +"##; + let expected = r##"<p><a href='bar'title=title></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_622() { + let original = r##"</a></foo > +"##; + let expected = r##"<p></a></foo ></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_623() { + let original = r##"</a href="foo"> +"##; + let expected = r##"<p></a href="foo"></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_624() { + let original = r##"foo <!-- this is a +comment - with hyphen --> +"##; + let expected = r##"<p>foo <!-- this is a +comment - with hyphen --></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_625() { + let original = r##"foo <!-- not a comment -- two hyphens --> +"##; + let expected = r##"<p>foo <!-- not a comment -- two hyphens --></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_626() { + let original = r##"foo <!--> foo --> + +foo <!-- foo---> +"##; + let expected = r##"<p>foo <!--> foo --></p> +<p>foo <!-- foo---></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_627() { + let original = r##"foo <?php echo $a; ?> +"##; + let expected = r##"<p>foo <?php echo $a; ?></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_628() { + let original = r##"foo <!ELEMENT br EMPTY> +"##; + let expected = r##"<p>foo <!ELEMENT br EMPTY></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_629() { + let original = r##"foo <![CDATA[>&<]]> +"##; + let expected = r##"<p>foo <![CDATA[>&<]]></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_630() { + let original = r##"foo <a href="ö"> +"##; + let expected = r##"<p>foo <a href="ö"></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_631() { + let original = r##"foo <a href="\*"> +"##; + let expected = r##"<p>foo <a href="\*"></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_632() { + let original = r##"<a href="\""> +"##; + let expected = r##"<p><a href="""></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_633() { + let original = r##"foo +baz +"##; + let expected = r##"<p>foo<br /> +baz</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_634() { + let original = r##"foo\ +baz +"##; + let expected = r##"<p>foo<br /> +baz</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_635() { + let original = r##"foo +baz +"##; + let expected = r##"<p>foo<br /> +baz</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_636() { + let original = r##"foo + bar +"##; + let expected = r##"<p>foo<br /> +bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_637() { + let original = r##"foo\ + bar +"##; + let expected = r##"<p>foo<br /> +bar</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_638() { + let original = r##"*foo +bar* +"##; + let expected = r##"<p><em>foo<br /> +bar</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_639() { + let original = r##"*foo\ +bar* +"##; + let expected = r##"<p><em>foo<br /> +bar</em></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_640() { + let original = r##"`code +span` +"##; + let expected = r##"<p><code>code span</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_641() { + let original = r##"`code\ +span` +"##; + let expected = r##"<p><code>code\ span</code></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_642() { + let original = r##"<a href="foo +bar"> +"##; + let expected = r##"<p><a href="foo +bar"></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_643() { + let original = r##"<a href="foo\ +bar"> +"##; + let expected = r##"<p><a href="foo\ +bar"></p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_644() { + let original = r##"foo\ +"##; + let expected = r##"<p>foo\</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_645() { + let original = r##"foo +"##; + let expected = r##"<p>foo</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_646() { + let original = r##"### foo\ +"##; + let expected = r##"<h3>foo\</h3> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_647() { + let original = r##"### foo +"##; + let expected = r##"<h3>foo</h3> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_648() { + let original = r##"foo +baz +"##; + let expected = r##"<p>foo +baz</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_649() { + let original = r##"foo + baz +"##; + let expected = r##"<p>foo +baz</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_650() { + let original = r##"hello $.;'there +"##; + let expected = r##"<p>hello $.;'there</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_651() { + let original = r##"Foo χρῆν +"##; + let expected = r##"<p>Foo χρῆν</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn spec_test_652() { + let original = r##"Multiple spaces +"##; + let expected = r##"<p>Multiple spaces</p> +"##; + + test_markdown_html(original, expected, false); +} diff --git a/vendor/pulldown-cmark/tests/suite/table.rs b/vendor/pulldown-cmark/tests/suite/table.rs new file mode 100644 index 000000000..c034955e1 --- /dev/null +++ b/vendor/pulldown-cmark/tests/suite/table.rs @@ -0,0 +1,205 @@ +// This file is auto-generated by the build script +// Please, do not modify it manually + +use super::test_markdown_html; + +#[test] +fn table_test_1() { + let original = r##"Test header +----------- +"##; + let expected = r##"<h2>Test header</h2> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn table_test_2() { + let original = r##"Test|Table +----|----- +"##; + let expected = r##"<table><thead><tr><th>Test</th><th>Table</th></tr></thead> +</table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn table_test_3() { + let original = r##"> Test | Table +> ------|------ +> Row 1 | Every +> Row 2 | Day +> +> Paragraph +"##; + let expected = r##"<blockquote> +<table><thead><tr><th>Test </th><th> Table</th></tr></thead> +<tr><td>Row 1 </td><td> Every</td></tr> +<tr><td>Row 2 </td><td> Day</td></tr> +</table> +<p>Paragraph</p> +</blockquote> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn table_test_4() { + let original = r##" 1. First entry + 2. Second entry + + Col 1|Col 2 + -|- + Row 1|Part 2 + Row 2|Part 2 +"##; + let expected = r##"<ol> +<li> +<p>First entry</p> +</li> +<li> +<p>Second entry</p> +<table><thead><tr><th>Col 1</th><th>Col 2</th></tr></thead> +<tr><td>Row 1</td><td>Part 2</td></tr> +<tr><td>Row 2</td><td>Part 2</td></tr> +</table> +</li> +</ol> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn table_test_5() { + let original = r##"|Col 1|Col 2| +|-----|-----| +|R1C1 |R1C2 | +|R2C1 |R2C2 | +"##; + let expected = r##"<table><thead><tr><th>Col 1</th><th>Col 2</th></tr></thead> +<tr><td>R1C1 </td><td>R1C2 </td></tr> +<tr><td>R2C1 </td><td>R2C2 </td></tr> +</table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn table_test_6() { + let original = r##"| Col 1 | Col 2 | +|-------|-------| +| | | +| | | +"##; + let expected = r##"<table><thead><tr><th> Col 1 </th><th> Col 2 </th></tr></thead> +<tr><td> </td><td> </td></tr> +<tr><td> </td><td> </td></tr> +</table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn table_test_7() { + let original = r##"| Col 1 | Col 2 | +|-------|-------| +| x | | +| | x | +"##; + let expected = r##"<table><thead><tr><th> Col 1 </th><th> Col 2 </th></tr></thead> +<tr><td> x </td><td> </td></tr> +<tr><td> </td><td> x </td></tr> +</table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn table_test_8() { + let original = r##"|Col 1|Col 2| +|-----|-----| +|✓ |✓ | +|✓ |✓ | +"##; + let expected = r##"<table><thead><tr><th>Col 1</th><th>Col 2</th></tr></thead> +<tr><td>✓ </td><td>✓ </td></tr> +<tr><td>✓ </td><td>✓ </td></tr> +</table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn table_test_9() { + let original = r##"| Target | std |rustc|cargo| notes | +|-------------------------------|-----|-----|-----|----------------------------| +| `x86_64-unknown-linux-musl` | ✓ | | | 64-bit Linux with MUSL | +| `arm-linux-androideabi` | ✓ | | | ARM Android | +| `arm-unknown-linux-gnueabi` | ✓ | ✓ | | ARM Linux (2.6.18+) | +| `arm-unknown-linux-gnueabihf` | ✓ | ✓ | | ARM Linux (2.6.18+) | +| `aarch64-unknown-linux-gnu` | ✓ | | | ARM64 Linux (2.6.18+) | +| `mips-unknown-linux-gnu` | ✓ | | | MIPS Linux (2.6.18+) | +| `mipsel-unknown-linux-gnu` | ✓ | | | MIPS (LE) Linux (2.6.18+) | +"##; + let expected = r##"<table><thead><tr><th> Target </th><th> std </th><th>rustc</th><th>cargo</th><th> notes </th></tr></thead> +<tr><td> <code>x86_64-unknown-linux-musl</code> </td><td> ✓ </td><td> </td><td> </td><td> 64-bit Linux with MUSL </td></tr> +<tr><td> <code>arm-linux-androideabi</code> </td><td> ✓ </td><td> </td><td> </td><td> ARM Android </td></tr> +<tr><td> <code>arm-unknown-linux-gnueabi</code> </td><td> ✓ </td><td> ✓ </td><td> </td><td> ARM Linux (2.6.18+) </td></tr> +<tr><td> <code>arm-unknown-linux-gnueabihf</code> </td><td> ✓ </td><td> ✓ </td><td> </td><td> ARM Linux (2.6.18+) </td></tr> +<tr><td> <code>aarch64-unknown-linux-gnu</code> </td><td> ✓ </td><td> </td><td> </td><td> ARM64 Linux (2.6.18+) </td></tr> +<tr><td> <code>mips-unknown-linux-gnu</code> </td><td> ✓ </td><td> </td><td> </td><td> MIPS Linux (2.6.18+) </td></tr> +<tr><td> <code>mipsel-unknown-linux-gnu</code> </td><td> ✓ </td><td> </td><td> </td><td> MIPS (LE) Linux (2.6.18+) </td></tr> +</table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn table_test_10() { + let original = r##"|-|-| +|ぃ|い| +"##; + let expected = r##"<p>|-|-| +|ぃ|い|</p> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn table_test_11() { + let original = r##"|ぁ|ぃ| +|-|-| +|ぃ|ぃ| +"##; + let expected = r##"<table><thead><tr><th>ぁ</th><th>ぃ</th></tr></thead> +<tr><td>ぃ</td><td>ぃ</td></tr> +</table> +"##; + + test_markdown_html(original, expected, false); +} + +#[test] +fn table_test_12() { + let original = r##"|Колонка 1|Колонка 2| +|---------|---------| +|Ячейка 1 |Ячейка 2 | +"##; + let expected = r##"<table><thead><tr><th>Колонка 1</th><th>Колонка 2</th></tr></thead> +<tr><td>Ячейка 1 </td><td>Ячейка 2 </td></tr> +</table> +"##; + + test_markdown_html(original, expected, false); +} |