summaryrefslogtreecommitdiffstats
path: root/tests/test_port
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:24:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:24:24 +0000
commit12e8343068b906f8b2afddc5569968a8a91fa5b0 (patch)
tree75cc5e05a4392ea0292251898f992a15a16b172b /tests/test_port
parentInitial commit. (diff)
downloadmarkdown-it-py-ef6b3991640e41f44752cdb6502719ca58a762c8.tar.xz
markdown-it-py-ef6b3991640e41f44752cdb6502719ca58a762c8.zip
Adding upstream version 2.1.0.upstream/2.1.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_port')
-rw-r--r--tests/test_port/fixtures/commonmark_extras.md696
-rw-r--r--tests/test_port/fixtures/commonmark_spec.md7834
-rw-r--r--tests/test_port/fixtures/fatal.md41
-rw-r--r--tests/test_port/fixtures/issue-fixes.md38
-rw-r--r--tests/test_port/fixtures/linkify.md99
-rw-r--r--tests/test_port/fixtures/normalize.md39
-rw-r--r--tests/test_port/fixtures/proto.md16
-rw-r--r--tests/test_port/fixtures/punycode.md77
-rw-r--r--tests/test_port/fixtures/smartquotes.md166
-rw-r--r--tests/test_port/fixtures/strikethrough.md136
-rw-r--r--tests/test_port/fixtures/tables.md896
-rw-r--r--tests/test_port/fixtures/typographer.md115
-rw-r--r--tests/test_port/fixtures/xss.md128
-rw-r--r--tests/test_port/test_fixtures.py114
-rw-r--r--tests/test_port/test_misc.py44
-rw-r--r--tests/test_port/test_no_end_newline.py27
-rw-r--r--tests/test_port/test_references.py53
-rw-r--r--tests/test_port/test_references/test_inline_definitions.yml94
-rw-r--r--tests/test_port/test_references/test_store_labels.yml159
-rw-r--r--tests/test_port/test_references/test_use_existing_env.yml84
20 files changed, 10856 insertions, 0 deletions
diff --git a/tests/test_port/fixtures/commonmark_extras.md b/tests/test_port/fixtures/commonmark_extras.md
new file mode 100644
index 0000000..168b039
--- /dev/null
+++ b/tests/test_port/fixtures/commonmark_extras.md
@@ -0,0 +1,696 @@
+Issue commonmark/cmark#383:
+.
+*****Hello*world****
+.
+<p>**<em><strong>Hello<em>world</em></strong></em></p>
+.
+
+Issue #246. Double escaping in ALT
+.
+![&](#)
+.
+<p><img src="#" alt="&amp;" /></p>
+.
+
+Strip markdown in ALT tags
+.
+![*strip* [markdown __in__ alt](#)](#)
+.
+<p><img src="#" alt="strip markdown in alt" /></p>
+.
+
+Issue #55:
+.
+![test]
+
+![test](foo bar)
+.
+<p>![test]</p>
+<p>![test](foo bar)</p>
+.
+
+
+Reference labels: 'i̇θωkå'.toUpperCase() is 'İΘΩKÅ', but these should still be equivalent
+.
+[İϴΩKÅ]
+
+[i̇θωkå]: /url
+.
+<p><a href="/url">İϴΩKÅ</a></p>
+.
+
+
+Reference labels: support ligatures (equivalent according to unicode case folding)
+.
+[fffifl]
+
+[fffifl]: /url
+.
+<p><a href="/url">fffifl</a></p>
+.
+
+
+Issue #35. `<` should work as punctuation
+.
+an **(:**<br />
+.
+<p>an <strong>(:</strong><br /></p>
+.
+
+
+Should unescape only needed things in link destinations/titles:
+.
+[test](<\f\o\o\>\\>)
+
+[test](foo "\\\"\b\a\r")
+.
+<p><a href="%5Cf%5Co%5Co%3E%5C">test</a></p>
+<p><a href="foo" title="\&quot;\b\a\r">test</a></p>
+.
+
+
+Not a closing tag
+.
+</ 123>
+.
+<p>&lt;/ 123&gt;</p>
+.
+
+
+
+Escaping entities in links:
+.
+[](<&quot;> "&amp;&ouml;")
+
+[](<\&quot;> "\&amp;\&ouml;")
+
+[](<\\&quot;> "\\&quot;\\&ouml;")
+.
+<p><a href="%22" title="&amp;ö"></a></p>
+<p><a href="&amp;quot;" title="&amp;amp;&amp;ouml;"></a></p>
+<p><a href="%5C%22" title="\&quot;\ö"></a></p>
+.
+
+
+Checking combination of replaceEntities and unescapeMd:
+.
+~~~ &amp;&bad;\&amp;\\&amp;
+just a funny little fence
+~~~
+.
+<pre><code class="&amp;&amp;bad;&amp;amp;\&amp;">just a funny little fence
+</code></pre>
+.
+
+Underscore between punctuation chars should be able to close emphasis.
+
+.
+_(hai)_.
+.
+<p><em>(hai)</em>.</p>
+.
+
+Regression test, should not match emphasis markers in different link tags:
+.
+[*b]() [c*]()
+.
+<p><a href="">*b</a> <a href="">c*</a></p>
+.
+
+Those are two separate blockquotes:
+.
+ - > foo
+ > bar
+.
+<ul>
+<li>
+<blockquote>
+<p>foo</p>
+</blockquote>
+</li>
+</ul>
+<blockquote>
+<p>bar</p>
+</blockquote>
+.
+
+Blockquote should terminate itself after paragraph continuation
+.
+- list
+ > blockquote
+blockquote continuation
+ - next list item
+.
+<ul>
+<li>list
+<blockquote>
+<p>blockquote
+blockquote continuation</p>
+</blockquote>
+<ul>
+<li>next list item</li>
+</ul>
+</li>
+</ul>
+.
+
+Regression test (code block + regular paragraph)
+.
+> foo
+> bar
+.
+<blockquote>
+<pre><code>foo
+</code></pre>
+<p>bar</p>
+</blockquote>
+.
+
+Blockquotes inside indented lists should terminate correctly
+.
+ - a
+ > b
+ ```
+ c
+ ```
+ - d
+.
+<ul>
+<li>a
+<blockquote>
+<p>b</p>
+</blockquote>
+<pre><code>c
+</code></pre>
+</li>
+<li>d</li>
+</ul>
+.
+
+Don't output empty class here:
+.
+```&#x20;
+test
+```
+.
+<pre><code>test
+</code></pre>
+.
+
+Setext header text supports lazy continuations:
+.
+ - foo
+bar
+ ===
+.
+<ul>
+<li>
+<h1>foo
+bar</h1>
+</li>
+</ul>
+.
+
+But setext header underline doesn't:
+.
+ - foo
+ bar
+ ===
+.
+<ul>
+<li>foo
+bar
+===</li>
+</ul>
+.
+
+Tabs should be stripped from the beginning of the line
+.
+ foo
+ bar
+ baz
+.
+<p>foo
+bar
+baz</p>
+.
+
+Tabs should not cause hardbreak, EOL tabs aren't stripped in commonmark 0.27
+.
+foo1
+foo2
+bar
+.
+<p>foo1
+foo2<br />
+bar</p>
+.
+
+List item terminating quote should not be paragraph continuation
+.
+1. foo
+ > quote
+2. bar
+.
+<ol>
+<li>foo
+<blockquote>
+<p>quote</p>
+</blockquote>
+</li>
+<li>bar</li>
+</ol>
+.
+
+Escaped space is not allowed in link destination, commonmark/CommonMark#493.
+.
+[link](a\ b)
+.
+<p>[link](a\ b)</p>
+.
+
+Link destination cannot contain '<'
+.
+[](<foo<bar>)
+
+[](<foo\<bar>)
+.
+<p>[](&lt;foo<bar>)</p>
+<p><a href="foo%3Cbar"></a></p>
+.
+
+Link title cannot contain '(' when opened with it
+.
+[](url (xxx())
+
+[](url (xxx\())
+.
+<p>[](url (xxx())</p>
+<p><a href="url" title="xxx("></a></p>
+.
+
+Allow EOL in processing instructions, commonmark/commonmark.js#196.
+.
+a <?
+?>
+.
+<p>a <?
+?></p>
+.
+
+Allow meta tag in an inline context, commonmark/commonmark-spec#527.
+.
+City:
+<span itemprop="contentLocation" itemscope itemtype="https://schema.org/City">
+ <meta itemprop="name" content="Springfield">
+</span>
+.
+<p>City:
+<span itemprop="contentLocation" itemscope itemtype="https://schema.org/City">
+<meta itemprop="name" content="Springfield">
+</span></p>
+.
+
+Coverage. Directive can terminate paragraph.
+.
+a
+<?php
+.
+<p>a</p>
+<?php
+.
+
+
+Coverage. Nested email autolink (silent mode)
+.
+*<foo@bar.com>*
+.
+<p><em><a href="mailto:foo@bar.com">foo@bar.com</a></em></p>
+.
+
+
+Coverage. Unpaired nested backtick (silent mode)
+.
+*`foo*
+.
+<p><em>`foo</em></p>
+.
+
+
+Coverage. Should continue scanning after closing "```" despite cache
+.
+```aaa``bbb``ccc```ddd``eee``
+.
+<p><code>aaa``bbb``ccc</code>ddd<code>eee</code></p>
+.
+
+
+Coverage. Entities.
+.
+*&*
+
+*&#x20;*
+
+*&amp;*
+.
+<p><em>&amp;</em></p>
+<p><em> </em></p>
+<p><em>&amp;</em></p>
+.
+
+
+Coverage. Escape.
+.
+*\a*
+.
+<p><em>\a</em></p>
+.
+
+
+Coverage. parseLinkDestination
+.
+[foo](<
+bar>)
+
+[foo](<bar)
+.
+<p>[foo](&lt;
+bar&gt;)</p>
+<p>[foo](&lt;bar)</p>
+.
+
+
+Coverage. parseLinkTitle
+.
+[foo](bar "ba)
+
+[foo](bar "ba\
+z")
+.
+<p>[foo](bar &quot;ba)</p>
+<p><a href="bar" title="ba\
+z">foo</a></p>
+.
+
+
+Coverage. Image
+.
+![test]( x )
+.
+<p><img src="x" alt="test" /></p>
+.
+.
+![test][foo]
+
+[bar]: 123
+.
+<p>![test][foo]</p>
+.
+.
+![test][[[
+
+[bar]: 123
+.
+<p>![test][[[</p>
+.
+.
+![test](
+.
+<p>![test](</p>
+.
+
+
+Coverage. Link
+.
+[test](
+.
+<p>[test](</p>
+.
+
+
+Coverage. Reference
+.
+[
+test\
+]: 123
+foo
+bar
+.
+<p>foo
+bar</p>
+.
+.
+[
+test
+]
+.
+<p>[
+test
+]</p>
+.
+.
+> [foo]: bar
+[foo]
+.
+<blockquote></blockquote>
+<p><a href="bar">foo</a></p>
+.
+
+Coverage. Tabs in blockquotes.
+.
+> test
+
+ > test
+
+ > test
+
+> ---
+> test
+
+ > ---
+ > test
+
+ > ---
+ > test
+
+> test
+
+ > test
+
+ > test
+
+> ---
+> test
+
+ > ---
+ > test
+
+ > ---
+ > test
+.
+<blockquote>
+<pre><code> test
+</code></pre>
+</blockquote>
+<blockquote>
+<pre><code> test
+</code></pre>
+</blockquote>
+<blockquote>
+<pre><code>test
+</code></pre>
+</blockquote>
+<blockquote>
+<hr />
+<pre><code> test
+</code></pre>
+</blockquote>
+<blockquote>
+<hr />
+<pre><code> test
+</code></pre>
+</blockquote>
+<blockquote>
+<hr />
+<pre><code>test
+</code></pre>
+</blockquote>
+<blockquote>
+<pre><code> test
+</code></pre>
+</blockquote>
+<blockquote>
+<pre><code> test
+</code></pre>
+</blockquote>
+<blockquote>
+<pre><code> test
+</code></pre>
+</blockquote>
+<blockquote>
+<hr />
+<pre><code> test
+</code></pre>
+</blockquote>
+<blockquote>
+<hr />
+<pre><code> test
+</code></pre>
+</blockquote>
+<blockquote>
+<hr />
+<pre><code> test
+</code></pre>
+</blockquote>
+.
+
+Coverage. Tabs in lists.
+.
+1. foo
+
+ bar
+.
+<ol>
+<li>
+<p>foo</p>
+<pre><code> bar
+</code></pre>
+</li>
+</ol>
+.
+
+Coverage. Various tags not interrupting blockquotes because of indentation:
+.
+> foo
+ - - - -
+
+> foo
+ # not a heading
+.
+<blockquote>
+<p>foo
+- - - -</p>
+</blockquote>
+<blockquote>
+<p>foo
+# not a heading</p>
+</blockquote>
+.
+
+Coverage, entities with code > 10FFFF. Made this way for compatibility with commonmark.js.
+.
+&#x110000;
+
+&#x1100000;
+.
+<p>�</p>
+<p>&amp;#x1100000;</p>
+.
+
+Issue #696. Blockquotes should remember their level.
+.
+>>> foo
+bar
+>>> baz
+.
+<blockquote>
+<blockquote>
+<blockquote>
+<p>foo
+bar
+baz</p>
+</blockquote>
+</blockquote>
+</blockquote>
+.
+
+Issue #696. Blockquotes should stop when outdented from a list.
+.
+1. >>> foo
+ bar
+baz
+ >>> foo
+ >>> bar
+ >>> baz
+.
+<ol>
+<li>
+<blockquote>
+<blockquote>
+<blockquote>
+<p>foo
+bar
+baz
+foo</p>
+</blockquote>
+</blockquote>
+</blockquote>
+</li>
+</ol>
+<blockquote>
+<blockquote>
+<blockquote>
+<p>bar
+baz</p>
+</blockquote>
+</blockquote>
+</blockquote>
+.
+
+Newline in image description
+.
+There is a newline in this image ![here
+it is](https://github.com/executablebooks/)
+.
+<p>There is a newline in this image <img src="https://github.com/executablebooks/" alt="here
+it is" /></p>
+.
+
+Issue #772. Header rule should not interfere with html tags.
+.
+<!--
+==
+-->
+
+<pre>
+==
+</pre>
+.
+<!--
+==
+-->
+<pre>
+==
+</pre>
+.
+
+Issue #205. Space in link destination generates IndexError
+.
+[Contact](http:// mail.com)
+
+[Contact](mailto: mail@mail.com)
+.
+<p>[Contact](http:// mail.com)</p>
+<p>[Contact](mailto: mail@mail.com)</p>
+.
+
+Issue #204. Combination of blockquotes, list and newlines causes an IndexError
+.
+> QUOTE
++ UNORDERED LIST ITEM
+ > INDENTED QUOTE
+
+
+
+.
+<blockquote>
+<p>QUOTE</p>
+</blockquote>
+<ul>
+<li>UNORDERED LIST ITEM
+<blockquote>
+<p>INDENTED QUOTE</p>
+</blockquote>
+</li>
+</ul>
+.
diff --git a/tests/test_port/fixtures/commonmark_spec.md b/tests/test_port/fixtures/commonmark_spec.md
new file mode 100644
index 0000000..c437019
--- /dev/null
+++ b/tests/test_port/fixtures/commonmark_spec.md
@@ -0,0 +1,7834 @@
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 355
+
+.
+ foo baz bim
+.
+<pre><code>foo baz bim
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 362
+
+.
+ foo baz bim
+.
+<pre><code>foo baz bim
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 369
+
+.
+ a a
+ ὐ a
+.
+<pre><code>a a
+ὐ a
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 382
+
+.
+ - foo
+
+ bar
+.
+<ul>
+<li>
+<p>foo</p>
+<p>bar</p>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 395
+
+.
+- foo
+
+ bar
+.
+<ul>
+<li>
+<p>foo</p>
+<pre><code> bar
+</code></pre>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 418
+
+.
+> foo
+.
+<blockquote>
+<pre><code> foo
+</code></pre>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 427
+
+.
+- foo
+.
+<ul>
+<li>
+<pre><code> foo
+</code></pre>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 439
+
+.
+ foo
+ bar
+.
+<pre><code>foo
+bar
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 448
+
+.
+ - foo
+ - bar
+ - baz
+.
+<ul>
+<li>foo
+<ul>
+<li>bar
+<ul>
+<li>baz</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 466
+
+.
+# Foo
+.
+<h1>Foo</h1>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 472
+
+.
+* * *
+.
+<hr />
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 489
+
+.
+\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~
+.
+<p>!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^_`{|}~</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 499
+
+.
+\ \A\a\ \3\φ\«
+.
+<p>\ \A\a\ \3\φ\«</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 509
+
+.
+\*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>*not emphasized*
+&lt;br/&gt; not a tag
+[not a link](/foo)
+`not code`
+1. not a list
+* not a list
+# not a heading
+[foo]: /url &quot;not a reference&quot;
+&amp;ouml; not a character entity</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 534
+
+.
+\\*emphasis*
+.
+<p>\<em>emphasis</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 543
+
+.
+foo\
+bar
+.
+<p>foo<br />
+bar</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 555
+
+.
+`` \[\` ``
+.
+<p><code>\[\`</code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 562
+
+.
+ \[\]
+.
+<pre><code>\[\]
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 570
+
+.
+~~~
+\[\]
+~~~
+.
+<pre><code>\[\]
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 580
+
+.
+<http://example.com?find=\*>
+.
+<p><a href="http://example.com?find=%5C*">http://example.com?find=\*</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 587
+
+.
+<a href="/bar\/)">
+.
+<a href="/bar\/)">
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 597
+
+.
+[foo](/bar\* "ti\*tle")
+.
+<p><a href="/bar*" title="ti*tle">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 604
+
+.
+[foo]
+
+[foo]: /bar\* "ti\*tle"
+.
+<p><a href="/bar*" title="ti*tle">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 613
+
+.
+``` foo\+bar
+foo
+```
+.
+<pre><code class="language-foo+bar">foo
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 649
+
+.
+&nbsp; &amp; &copy; &AElig; &Dcaron;
+&frac34; &HilbertSpace; &DifferentialD;
+&ClockwiseContourIntegral; &ngE;
+.
+<p>  &amp; © Æ Ď
+¾ ℋ ⅆ
+∲ ≧̸</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 668
+
+.
+&#35; &#1234; &#992; &#0;
+.
+<p># Ӓ Ϡ �</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 681
+
+.
+&#X22; &#XD06; &#xcab;
+.
+<p>&quot; ആ ಫ</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 690
+
+.
+&nbsp &x; &#; &#x;
+&#87654321;
+&#abcdef0;
+&ThisIsNotDefined; &hi?;
+.
+<p>&amp;nbsp &amp;x; &amp;#; &amp;#x;
+&amp;#87654321;
+&amp;#abcdef0;
+&amp;ThisIsNotDefined; &amp;hi?;</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 707
+
+.
+&copy
+.
+<p>&amp;copy</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 717
+
+.
+&MadeUpEntity;
+.
+<p>&amp;MadeUpEntity;</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 728
+
+.
+<a href="&ouml;&ouml;.html">
+.
+<a href="&ouml;&ouml;.html">
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 735
+
+.
+[foo](/f&ouml;&ouml; "f&ouml;&ouml;")
+.
+<p><a href="/f%C3%B6%C3%B6" title="föö">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 742
+
+.
+[foo]
+
+[foo]: /f&ouml;&ouml; "f&ouml;&ouml;"
+.
+<p><a href="/f%C3%B6%C3%B6" title="föö">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 751
+
+.
+``` f&ouml;&ouml;
+foo
+```
+.
+<pre><code class="language-föö">foo
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 764
+
+.
+`f&ouml;&ouml;`
+.
+<p><code>f&amp;ouml;&amp;ouml;</code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 771
+
+.
+ f&ouml;f&ouml;
+.
+<pre><code>f&amp;ouml;f&amp;ouml;
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 783
+
+.
+&#42;foo&#42;
+*foo*
+.
+<p>*foo*
+<em>foo</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 791
+
+.
+&#42; foo
+
+* foo
+.
+<p>* foo</p>
+<ul>
+<li>foo</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 802
+
+.
+foo&#10;&#10;bar
+.
+<p>foo
+
+bar</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 810
+
+.
+&#9;foo
+.
+<p> foo</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 817
+
+.
+[a](url &quot;tit&quot;)
+.
+<p>[a](url &quot;tit&quot;)</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 840
+
+.
+- `one
+- two`
+.
+<ul>
+<li>`one</li>
+<li>two`</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 879
+
+.
+***
+---
+___
+.
+<hr />
+<hr />
+<hr />
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 892
+
+.
++++
+.
+<p>+++</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 899
+
+.
+===
+.
+<p>===</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 908
+
+.
+--
+**
+__
+.
+<p>--
+**
+__</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 921
+
+.
+ ***
+ ***
+ ***
+.
+<hr />
+<hr />
+<hr />
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 934
+
+.
+ ***
+.
+<pre><code>***
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 942
+
+.
+Foo
+ ***
+.
+<p>Foo
+***</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 953
+
+.
+_____________________________________
+.
+<hr />
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 962
+
+.
+ - - -
+.
+<hr />
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 969
+
+.
+ ** * ** * ** * **
+.
+<hr />
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 976
+
+.
+- - - -
+.
+<hr />
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 985
+
+.
+- - - -
+.
+<hr />
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 994
+
+.
+_ _ _ _ a
+
+a------
+
+---a---
+.
+<p>_ _ _ _ a</p>
+<p>a------</p>
+<p>---a---</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1010
+
+.
+ *-*
+.
+<p><em>-</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1019
+
+.
+- foo
+***
+- bar
+.
+<ul>
+<li>foo</li>
+</ul>
+<hr />
+<ul>
+<li>bar</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1036
+
+.
+Foo
+***
+bar
+.
+<p>Foo</p>
+<hr />
+<p>bar</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1053
+
+.
+Foo
+---
+bar
+.
+<h2>Foo</h2>
+<p>bar</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1066
+
+.
+* Foo
+* * *
+* Bar
+.
+<ul>
+<li>Foo</li>
+</ul>
+<hr />
+<ul>
+<li>Bar</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1083
+
+.
+- Foo
+- * * *
+.
+<ul>
+<li>Foo</li>
+<li>
+<hr />
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1112
+
+.
+# foo
+## foo
+### foo
+#### foo
+##### foo
+###### foo
+.
+<h1>foo</h1>
+<h2>foo</h2>
+<h3>foo</h3>
+<h4>foo</h4>
+<h5>foo</h5>
+<h6>foo</h6>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1131
+
+.
+####### foo
+.
+<p>####### foo</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1146
+
+.
+#5 bolt
+
+#hashtag
+.
+<p>#5 bolt</p>
+<p>#hashtag</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1158
+
+.
+\## foo
+.
+<p>## foo</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1167
+
+.
+# foo *bar* \*baz\*
+.
+<h1>foo <em>bar</em> *baz*</h1>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1176
+
+.
+# foo
+.
+<h1>foo</h1>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1185
+
+.
+ ### foo
+ ## foo
+ # foo
+.
+<h3>foo</h3>
+<h2>foo</h2>
+<h1>foo</h1>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1198
+
+.
+ # foo
+.
+<pre><code># foo
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1206
+
+.
+foo
+ # bar
+.
+<p>foo
+# bar</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1217
+
+.
+## foo ##
+ ### bar ###
+.
+<h2>foo</h2>
+<h3>bar</h3>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1228
+
+.
+# foo ##################################
+##### foo ##
+.
+<h1>foo</h1>
+<h5>foo</h5>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1239
+
+.
+### foo ###
+.
+<h3>foo</h3>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1250
+
+.
+### foo ### b
+.
+<h3>foo ### b</h3>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1259
+
+.
+# foo#
+.
+<h1>foo#</h1>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1269
+
+.
+### foo \###
+## foo #\##
+# foo \#
+.
+<h3>foo ###</h3>
+<h2>foo ###</h2>
+<h1>foo #</h1>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1283
+
+.
+****
+## foo
+****
+.
+<hr />
+<h2>foo</h2>
+<hr />
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1294
+
+.
+Foo bar
+# baz
+Bar foo
+.
+<p>Foo bar</p>
+<h1>baz</h1>
+<p>Bar foo</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1307
+
+.
+##
+#
+### ###
+.
+<h2></h2>
+<h1></h1>
+<h3></h3>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1350
+
+.
+Foo *bar*
+=========
+
+Foo *bar*
+---------
+.
+<h1>Foo <em>bar</em></h1>
+<h2>Foo <em>bar</em></h2>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1364
+
+.
+Foo *bar
+baz*
+====
+.
+<h1>Foo <em>bar
+baz</em></h1>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1378
+
+.
+ Foo *bar
+baz*
+====
+.
+<h1>Foo <em>bar
+baz</em></h1>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1390
+
+.
+Foo
+-------------------------
+
+Foo
+=
+.
+<h2>Foo</h2>
+<h1>Foo</h1>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1405
+
+.
+ Foo
+---
+
+ Foo
+-----
+
+ Foo
+ ===
+.
+<h2>Foo</h2>
+<h2>Foo</h2>
+<h1>Foo</h1>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1423
+
+.
+ Foo
+ ---
+
+ Foo
+---
+.
+<pre><code>Foo
+---
+
+Foo
+</code></pre>
+<hr />
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1442
+
+.
+Foo
+ ----
+.
+<h2>Foo</h2>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1452
+
+.
+Foo
+ ---
+.
+<p>Foo
+---</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1463
+
+.
+Foo
+= =
+
+Foo
+--- -
+.
+<p>Foo
+= =</p>
+<p>Foo</p>
+<hr />
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1479
+
+.
+Foo
+-----
+.
+<h2>Foo</h2>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1489
+
+.
+Foo\
+----
+.
+<h2>Foo\</h2>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1500
+
+.
+`Foo
+----
+`
+
+<a title="a lot
+---
+of dashes"/>
+.
+<h2>`Foo</h2>
+<p>`</p>
+<h2>&lt;a title=&quot;a lot</h2>
+<p>of dashes&quot;/&gt;</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1519
+
+.
+> Foo
+---
+.
+<blockquote>
+<p>Foo</p>
+</blockquote>
+<hr />
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1530
+
+.
+> foo
+bar
+===
+.
+<blockquote>
+<p>foo
+bar
+===</p>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1543
+
+.
+- Foo
+---
+.
+<ul>
+<li>Foo</li>
+</ul>
+<hr />
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1558
+
+.
+Foo
+Bar
+---
+.
+<h2>Foo
+Bar</h2>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1571
+
+.
+---
+Foo
+---
+Bar
+---
+Baz
+.
+<hr />
+<h2>Foo</h2>
+<h2>Bar</h2>
+<p>Baz</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1588
+
+.
+
+====
+.
+<p>====</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1600
+
+.
+---
+---
+.
+<hr />
+<hr />
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1609
+
+.
+- foo
+-----
+.
+<ul>
+<li>foo</li>
+</ul>
+<hr />
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1620
+
+.
+ foo
+---
+.
+<pre><code>foo
+</code></pre>
+<hr />
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1630
+
+.
+> foo
+-----
+.
+<blockquote>
+<p>foo</p>
+</blockquote>
+<hr />
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1644
+
+.
+\> foo
+------
+.
+<h2>&gt; foo</h2>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1675
+
+.
+Foo
+
+bar
+---
+baz
+.
+<p>Foo</p>
+<h2>bar</h2>
+<p>baz</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1691
+
+.
+Foo
+bar
+
+---
+
+baz
+.
+<p>Foo
+bar</p>
+<hr />
+<p>baz</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1709
+
+.
+Foo
+bar
+* * *
+baz
+.
+<p>Foo
+bar</p>
+<hr />
+<p>baz</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1724
+
+.
+Foo
+bar
+\---
+baz
+.
+<p>Foo
+bar
+---
+baz</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1752
+
+.
+ a simple
+ indented code block
+.
+<pre><code>a simple
+ indented code block
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1766
+
+.
+ - foo
+
+ bar
+.
+<ul>
+<li>
+<p>foo</p>
+<p>bar</p>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1780
+
+.
+1. foo
+
+ - bar
+.
+<ol>
+<li>
+<p>foo</p>
+<ul>
+<li>bar</li>
+</ul>
+</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1800
+
+.
+ <a/>
+ *hi*
+
+ - one
+.
+<pre><code>&lt;a/&gt;
+*hi*
+
+- one
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1816
+
+.
+ chunk1
+
+ chunk2
+
+
+
+ chunk3
+.
+<pre><code>chunk1
+
+chunk2
+
+
+
+chunk3
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1839
+
+.
+ chunk1
+
+ chunk2
+.
+<pre><code>chunk1
+
+ chunk2
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1854
+
+.
+Foo
+ bar
+
+.
+<p>Foo
+bar</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1868
+
+.
+ foo
+bar
+.
+<pre><code>foo
+</code></pre>
+<p>bar</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1881
+
+.
+# Heading
+ foo
+Heading
+------
+ foo
+----
+.
+<h1>Heading</h1>
+<pre><code>foo
+</code></pre>
+<h2>Heading</h2>
+<pre><code>foo
+</code></pre>
+<hr />
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1901
+
+.
+ foo
+ bar
+.
+<pre><code> foo
+bar
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1914
+
+.
+
+
+ foo
+
+
+.
+<pre><code>foo
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1928
+
+.
+ foo
+.
+<pre><code>foo
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1983
+
+.
+```
+<
+ >
+```
+.
+<pre><code>&lt;
+ &gt;
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 1997
+
+.
+~~~
+<
+ >
+~~~
+.
+<pre><code>&lt;
+ &gt;
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2010
+
+.
+``
+foo
+``
+.
+<p><code>foo</code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2021
+
+.
+```
+aaa
+~~~
+```
+.
+<pre><code>aaa
+~~~
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2033
+
+.
+~~~
+aaa
+```
+~~~
+.
+<pre><code>aaa
+```
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2047
+
+.
+````
+aaa
+```
+``````
+.
+<pre><code>aaa
+```
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2059
+
+.
+~~~~
+aaa
+~~~
+~~~~
+.
+<pre><code>aaa
+~~~
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2074
+
+.
+```
+.
+<pre><code></code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2081
+
+.
+`````
+
+```
+aaa
+.
+<pre><code>
+```
+aaa
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2094
+
+.
+> ```
+> aaa
+
+bbb
+.
+<blockquote>
+<pre><code>aaa
+</code></pre>
+</blockquote>
+<p>bbb</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2110
+
+.
+```
+
+
+```
+.
+<pre><code>
+
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2124
+
+.
+```
+```
+.
+<pre><code></code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2136
+
+.
+ ```
+ aaa
+aaa
+```
+.
+<pre><code>aaa
+aaa
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2148
+
+.
+ ```
+aaa
+ aaa
+aaa
+ ```
+.
+<pre><code>aaa
+aaa
+aaa
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2162
+
+.
+ ```
+ aaa
+ aaa
+ aaa
+ ```
+.
+<pre><code>aaa
+ aaa
+aaa
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2178
+
+.
+ ```
+ aaa
+ ```
+.
+<pre><code>```
+aaa
+```
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2193
+
+.
+```
+aaa
+ ```
+.
+<pre><code>aaa
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2203
+
+.
+ ```
+aaa
+ ```
+.
+<pre><code>aaa
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2215
+
+.
+```
+aaa
+ ```
+.
+<pre><code>aaa
+ ```
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2229
+
+.
+``` ```
+aaa
+.
+<p><code> </code>
+aaa</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2238
+
+.
+~~~~~~
+aaa
+~~~ ~~
+.
+<pre><code>aaa
+~~~ ~~
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2252
+
+.
+foo
+```
+bar
+```
+baz
+.
+<p>foo</p>
+<pre><code>bar
+</code></pre>
+<p>baz</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2269
+
+.
+foo
+---
+~~~
+bar
+~~~
+# baz
+.
+<h2>foo</h2>
+<pre><code>bar
+</code></pre>
+<h1>baz</h1>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2291
+
+.
+```ruby
+def foo(x)
+ return 3
+end
+```
+.
+<pre><code class="language-ruby">def foo(x)
+ return 3
+end
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2305
+
+.
+~~~~ ruby startline=3 $%@#$
+def foo(x)
+ return 3
+end
+~~~~~~~
+.
+<pre><code class="language-ruby">def foo(x)
+ return 3
+end
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2319
+
+.
+````;
+````
+.
+<pre><code class="language-;"></code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2329
+
+.
+``` aa ```
+foo
+.
+<p><code>aa</code>
+foo</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2340
+
+.
+~~~ aa ``` ~~~
+foo
+~~~
+.
+<pre><code class="language-aa">foo
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2352
+
+.
+```
+``` aaa
+```
+.
+<pre><code>``` aaa
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2431
+
+.
+<table><tr><td>
+<pre>
+**Hello**,
+
+_world_.
+</pre>
+</td></tr></table>
+.
+<table><tr><td>
+<pre>
+**Hello**,
+<p><em>world</em>.
+</pre></p>
+</td></tr></table>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2460
+
+.
+<table>
+ <tr>
+ <td>
+ hi
+ </td>
+ </tr>
+</table>
+
+okay.
+.
+<table>
+ <tr>
+ <td>
+ hi
+ </td>
+ </tr>
+</table>
+<p>okay.</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2482
+
+.
+ <div>
+ *hello*
+ <foo><a>
+.
+ <div>
+ *hello*
+ <foo><a>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2495
+
+.
+</div>
+*foo*
+.
+</div>
+*foo*
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2506
+
+.
+<DIV CLASS="foo">
+
+*Markdown*
+
+</DIV>
+.
+<DIV CLASS="foo">
+<p><em>Markdown</em></p>
+</DIV>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2522
+
+.
+<div id="foo"
+ class="bar">
+</div>
+.
+<div id="foo"
+ class="bar">
+</div>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2533
+
+.
+<div id="foo" class="bar
+ baz">
+</div>
+.
+<div id="foo" class="bar
+ baz">
+</div>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2545
+
+.
+<div>
+*foo*
+
+*bar*
+.
+<div>
+*foo*
+<p><em>bar</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2561
+
+.
+<div id="foo"
+*hi*
+.
+<div id="foo"
+*hi*
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2570
+
+.
+<div class
+foo
+.
+<div class
+foo
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2582
+
+.
+<div *???-&&&-<---
+*foo*
+.
+<div *???-&&&-<---
+*foo*
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2594
+
+.
+<div><a href="bar">*foo*</a></div>
+.
+<div><a href="bar">*foo*</a></div>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2601
+
+.
+<table><tr><td>
+foo
+</td></tr></table>
+.
+<table><tr><td>
+foo
+</td></tr></table>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2618
+
+.
+<div></div>
+``` c
+int x = 33;
+```
+.
+<div></div>
+``` c
+int x = 33;
+```
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2635
+
+.
+<a href="foo">
+*bar*
+</a>
+.
+<a href="foo">
+*bar*
+</a>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2648
+
+.
+<Warning>
+*bar*
+</Warning>
+.
+<Warning>
+*bar*
+</Warning>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2659
+
+.
+<i class="foo">
+*bar*
+</i>
+.
+<i class="foo">
+*bar*
+</i>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2670
+
+.
+</ins>
+*bar*
+.
+</ins>
+*bar*
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2685
+
+.
+<del>
+*foo*
+</del>
+.
+<del>
+*foo*
+</del>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2700
+
+.
+<del>
+
+*foo*
+
+</del>
+.
+<del>
+<p><em>foo</em></p>
+</del>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2718
+
+.
+<del>*foo*</del>
+.
+<p><del><em>foo</em></del></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2734
+
+.
+<pre language="haskell"><code>
+import Text.HTML.TagSoup
+
+main :: IO ()
+main = print $ parseTags tags
+</code></pre>
+okay
+.
+<pre language="haskell"><code>
+import Text.HTML.TagSoup
+
+main :: IO ()
+main = print $ parseTags tags
+</code></pre>
+<p>okay</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2755
+
+.
+<script type="text/javascript">
+// JavaScript example
+
+document.getElementById("demo").innerHTML = "Hello JavaScript!";
+</script>
+okay
+.
+<script type="text/javascript">
+// JavaScript example
+
+document.getElementById("demo").innerHTML = "Hello JavaScript!";
+</script>
+<p>okay</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2774
+
+.
+<textarea>
+
+*foo*
+
+_bar_
+
+</textarea>
+.
+<textarea>
+
+*foo*
+
+_bar_
+
+</textarea>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2794
+
+.
+<style
+ type="text/css">
+h1 {color:red;}
+
+p {color:blue;}
+</style>
+okay
+.
+<style
+ type="text/css">
+h1 {color:red;}
+
+p {color:blue;}
+</style>
+<p>okay</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2817
+
+.
+<style
+ type="text/css">
+
+foo
+.
+<style
+ type="text/css">
+
+foo
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2830
+
+.
+> <div>
+> foo
+
+bar
+.
+<blockquote>
+<div>
+foo
+</blockquote>
+<p>bar</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2844
+
+.
+- <div>
+- foo
+.
+<ul>
+<li>
+<div>
+</li>
+<li>foo</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2859
+
+.
+<style>p{color:red;}</style>
+*foo*
+.
+<style>p{color:red;}</style>
+<p><em>foo</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2868
+
+.
+<!-- foo -->*bar*
+*baz*
+.
+<!-- foo -->*bar*
+<p><em>baz</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2880
+
+.
+<script>
+foo
+</script>1. *bar*
+.
+<script>
+foo
+</script>1. *bar*
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2893
+
+.
+<!-- Foo
+
+bar
+ baz -->
+okay
+.
+<!-- Foo
+
+bar
+ baz -->
+<p>okay</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2911
+
+.
+<?php
+
+ echo '>';
+
+?>
+okay
+.
+<?php
+
+ echo '>';
+
+?>
+<p>okay</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2930
+
+.
+<!DOCTYPE html>
+.
+<!DOCTYPE html>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2939
+
+.
+<![CDATA[
+function matchwo(a,b)
+{
+ if (a < b && a < 0) then {
+ return 1;
+
+ } else {
+
+ return 0;
+ }
+}
+]]>
+okay
+.
+<![CDATA[
+function matchwo(a,b)
+{
+ if (a < b && a < 0) then {
+ return 1;
+
+ } else {
+
+ return 0;
+ }
+}
+]]>
+<p>okay</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2973
+
+.
+ <!-- foo -->
+
+ <!-- foo -->
+.
+ <!-- foo -->
+<pre><code>&lt;!-- foo --&gt;
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2984
+
+.
+ <div>
+
+ <div>
+.
+ <div>
+<pre><code>&lt;div&gt;
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 2998
+
+.
+Foo
+<div>
+bar
+</div>
+.
+<p>Foo</p>
+<div>
+bar
+</div>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3015
+
+.
+<div>
+bar
+</div>
+*foo*
+.
+<div>
+bar
+</div>
+*foo*
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3030
+
+.
+Foo
+<a href="bar">
+baz
+.
+<p>Foo
+<a href="bar">
+baz</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3071
+
+.
+<div>
+
+*Emphasized* text.
+
+</div>
+.
+<div>
+<p><em>Emphasized</em> text.</p>
+</div>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3084
+
+.
+<div>
+*Emphasized* text.
+</div>
+.
+<div>
+*Emphasized* text.
+</div>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3106
+
+.
+<table>
+
+<tr>
+
+<td>
+Hi
+</td>
+
+</tr>
+
+</table>
+.
+<table>
+<tr>
+<td>
+Hi
+</td>
+</tr>
+</table>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3133
+
+.
+<table>
+
+ <tr>
+
+ <td>
+ Hi
+ </td>
+
+ </tr>
+
+</table>
+.
+<table>
+ <tr>
+<pre><code>&lt;td&gt;
+ Hi
+&lt;/td&gt;
+</code></pre>
+ </tr>
+</table>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3182
+
+.
+[foo]: /url "title"
+
+[foo]
+.
+<p><a href="/url" title="title">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3191
+
+.
+ [foo]:
+ /url
+ 'the title'
+
+[foo]
+.
+<p><a href="/url" title="the title">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3202
+
+.
+[Foo*bar\]]:my_(url) 'title (with parens)'
+
+[Foo*bar\]]
+.
+<p><a href="my_(url)" title="title (with parens)">Foo*bar]</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3211
+
+.
+[Foo bar]:
+<my url>
+'title'
+
+[Foo bar]
+.
+<p><a href="my%20url" title="title">Foo bar</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3224
+
+.
+[foo]: /url '
+title
+line1
+line2
+'
+
+[foo]
+.
+<p><a href="/url" title="
+title
+line1
+line2
+">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3243
+
+.
+[foo]: /url 'title
+
+with blank line'
+
+[foo]
+.
+<p>[foo]: /url 'title</p>
+<p>with blank line'</p>
+<p>[foo]</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3258
+
+.
+[foo]:
+/url
+
+[foo]
+.
+<p><a href="/url">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3270
+
+.
+[foo]:
+
+[foo]
+.
+<p>[foo]:</p>
+<p>[foo]</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3282
+
+.
+[foo]: <>
+
+[foo]
+.
+<p><a href="">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3293
+
+.
+[foo]: <bar>(baz)
+
+[foo]
+.
+<p>[foo]: <bar>(baz)</p>
+<p>[foo]</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3306
+
+.
+[foo]: /url\bar\*baz "foo\"bar\baz"
+
+[foo]
+.
+<p><a href="/url%5Cbar*baz" title="foo&quot;bar\baz">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3317
+
+.
+[foo]
+
+[foo]: url
+.
+<p><a href="url">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3329
+
+.
+[foo]
+
+[foo]: first
+[foo]: second
+.
+<p><a href="first">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3342
+
+.
+[FOO]: /url
+
+[Foo]
+.
+<p><a href="/url">Foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3351
+
+.
+[ΑΓΩ]: /φου
+
+[αγω]
+.
+<p><a href="/%CF%86%CE%BF%CF%85">αγω</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3366
+
+.
+[foo]: /url
+.
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3374
+
+.
+[
+foo
+]: /url
+bar
+.
+<p>bar</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3387
+
+.
+[foo]: /url "title" ok
+.
+<p>[foo]: /url &quot;title&quot; ok</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3396
+
+.
+[foo]: /url
+"title" ok
+.
+<p>&quot;title&quot; ok</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3407
+
+.
+ [foo]: /url "title"
+
+[foo]
+.
+<pre><code>[foo]: /url &quot;title&quot;
+</code></pre>
+<p>[foo]</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3421
+
+.
+```
+[foo]: /url
+```
+
+[foo]
+.
+<pre><code>[foo]: /url
+</code></pre>
+<p>[foo]</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3436
+
+.
+Foo
+[bar]: /baz
+
+[bar]
+.
+<p>Foo
+[bar]: /baz</p>
+<p>[bar]</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3451
+
+.
+# [Foo]
+[foo]: /url
+> bar
+.
+<h1><a href="/url">Foo</a></h1>
+<blockquote>
+<p>bar</p>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3462
+
+.
+[foo]: /url
+bar
+===
+[foo]
+.
+<h1>bar</h1>
+<p><a href="/url">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3472
+
+.
+[foo]: /url
+===
+[foo]
+.
+<p>===
+<a href="/url">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3485
+
+.
+[foo]: /foo-url "foo"
+[bar]: /bar-url
+ "bar"
+[baz]: /baz-url
+
+[foo],
+[bar],
+[baz]
+.
+<p><a href="/foo-url" title="foo">foo</a>,
+<a href="/bar-url" title="bar">bar</a>,
+<a href="/baz-url">baz</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3506
+
+.
+[foo]
+
+> [foo]: /url
+.
+<p><a href="/url">foo</a></p>
+<blockquote>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3528
+
+.
+aaa
+
+bbb
+.
+<p>aaa</p>
+<p>bbb</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3540
+
+.
+aaa
+bbb
+
+ccc
+ddd
+.
+<p>aaa
+bbb</p>
+<p>ccc
+ddd</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3556
+
+.
+aaa
+
+
+bbb
+.
+<p>aaa</p>
+<p>bbb</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3569
+
+.
+ aaa
+ bbb
+.
+<p>aaa
+bbb</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3581
+
+.
+aaa
+ bbb
+ ccc
+.
+<p>aaa
+bbb
+ccc</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3595
+
+.
+ aaa
+bbb
+.
+<p>aaa
+bbb</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3604
+
+.
+ aaa
+bbb
+.
+<pre><code>aaa
+</code></pre>
+<p>bbb</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3618
+
+.
+aaa
+bbb
+.
+<p>aaa<br />
+bbb</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3635
+
+.
+
+
+aaa
+
+
+# aaa
+
+
+.
+<p>aaa</p>
+<h1>aaa</h1>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3703
+
+.
+> # Foo
+> bar
+> baz
+.
+<blockquote>
+<h1>Foo</h1>
+<p>bar
+baz</p>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3718
+
+.
+># Foo
+>bar
+> baz
+.
+<blockquote>
+<h1>Foo</h1>
+<p>bar
+baz</p>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3733
+
+.
+ > # Foo
+ > bar
+ > baz
+.
+<blockquote>
+<h1>Foo</h1>
+<p>bar
+baz</p>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3748
+
+.
+ > # Foo
+ > bar
+ > baz
+.
+<pre><code>&gt; # Foo
+&gt; bar
+&gt; baz
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3763
+
+.
+> # Foo
+> bar
+baz
+.
+<blockquote>
+<h1>Foo</h1>
+<p>bar
+baz</p>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3779
+
+.
+> bar
+baz
+> foo
+.
+<blockquote>
+<p>bar
+baz
+foo</p>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3803
+
+.
+> foo
+---
+.
+<blockquote>
+<p>foo</p>
+</blockquote>
+<hr />
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3823
+
+.
+> - foo
+- bar
+.
+<blockquote>
+<ul>
+<li>foo</li>
+</ul>
+</blockquote>
+<ul>
+<li>bar</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3841
+
+.
+> foo
+ bar
+.
+<blockquote>
+<pre><code>foo
+</code></pre>
+</blockquote>
+<pre><code>bar
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3854
+
+.
+> ```
+foo
+```
+.
+<blockquote>
+<pre><code></code></pre>
+</blockquote>
+<p>foo</p>
+<pre><code></code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3870
+
+.
+> foo
+ - bar
+.
+<blockquote>
+<p>foo
+- bar</p>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3894
+
+.
+>
+.
+<blockquote>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3902
+
+.
+>
+>
+>
+.
+<blockquote>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3914
+
+.
+>
+> foo
+>
+.
+<blockquote>
+<p>foo</p>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3927
+
+.
+> foo
+
+> bar
+.
+<blockquote>
+<p>foo</p>
+</blockquote>
+<blockquote>
+<p>bar</p>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3949
+
+.
+> foo
+> bar
+.
+<blockquote>
+<p>foo
+bar</p>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3962
+
+.
+> foo
+>
+> bar
+.
+<blockquote>
+<p>foo</p>
+<p>bar</p>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3976
+
+.
+foo
+> bar
+.
+<p>foo</p>
+<blockquote>
+<p>bar</p>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 3990
+
+.
+> aaa
+***
+> bbb
+.
+<blockquote>
+<p>aaa</p>
+</blockquote>
+<hr />
+<blockquote>
+<p>bbb</p>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4008
+
+.
+> bar
+baz
+.
+<blockquote>
+<p>bar
+baz</p>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4019
+
+.
+> bar
+
+baz
+.
+<blockquote>
+<p>bar</p>
+</blockquote>
+<p>baz</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4031
+
+.
+> bar
+>
+baz
+.
+<blockquote>
+<p>bar</p>
+</blockquote>
+<p>baz</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4047
+
+.
+> > > foo
+bar
+.
+<blockquote>
+<blockquote>
+<blockquote>
+<p>foo
+bar</p>
+</blockquote>
+</blockquote>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4062
+
+.
+>>> foo
+> bar
+>>baz
+.
+<blockquote>
+<blockquote>
+<blockquote>
+<p>foo
+bar
+baz</p>
+</blockquote>
+</blockquote>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4084
+
+.
+> code
+
+> not code
+.
+<blockquote>
+<pre><code>code
+</code></pre>
+</blockquote>
+<blockquote>
+<p>not code</p>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4138
+
+.
+A paragraph
+with two lines.
+
+ indented code
+
+> A block quote.
+.
+<p>A paragraph
+with two lines.</p>
+<pre><code>indented code
+</code></pre>
+<blockquote>
+<p>A block quote.</p>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4160
+
+.
+1. A paragraph
+ with two lines.
+
+ indented code
+
+ > A block quote.
+.
+<ol>
+<li>
+<p>A paragraph
+with two lines.</p>
+<pre><code>indented code
+</code></pre>
+<blockquote>
+<p>A block quote.</p>
+</blockquote>
+</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4193
+
+.
+- one
+
+ two
+.
+<ul>
+<li>one</li>
+</ul>
+<p>two</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4205
+
+.
+- one
+
+ two
+.
+<ul>
+<li>
+<p>one</p>
+<p>two</p>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4219
+
+.
+ - one
+
+ two
+.
+<ul>
+<li>one</li>
+</ul>
+<pre><code> two
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4232
+
+.
+ - one
+
+ two
+.
+<ul>
+<li>
+<p>one</p>
+<p>two</p>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4254
+
+.
+ > > 1. one
+>>
+>> two
+.
+<blockquote>
+<blockquote>
+<ol>
+<li>
+<p>one</p>
+<p>two</p>
+</li>
+</ol>
+</blockquote>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4281
+
+.
+>>- one
+>>
+ > > two
+.
+<blockquote>
+<blockquote>
+<ul>
+<li>one</li>
+</ul>
+<p>two</p>
+</blockquote>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4300
+
+.
+-one
+
+2.two
+.
+<p>-one</p>
+<p>2.two</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4313
+
+.
+- foo
+
+
+ bar
+.
+<ul>
+<li>
+<p>foo</p>
+<p>bar</p>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4330
+
+.
+1. foo
+
+ ```
+ bar
+ ```
+
+ baz
+
+ > bam
+.
+<ol>
+<li>
+<p>foo</p>
+<pre><code>bar
+</code></pre>
+<p>baz</p>
+<blockquote>
+<p>bam</p>
+</blockquote>
+</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4358
+
+.
+- Foo
+
+ bar
+
+
+ baz
+.
+<ul>
+<li>
+<p>Foo</p>
+<pre><code>bar
+
+
+baz
+</code></pre>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4380
+
+.
+123456789. ok
+.
+<ol start="123456789">
+<li>ok</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4389
+
+.
+1234567890. not ok
+.
+<p>1234567890. not ok</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4398
+
+.
+0. ok
+.
+<ol start="0">
+<li>ok</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4407
+
+.
+003. ok
+.
+<ol start="3">
+<li>ok</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4418
+
+.
+-1. not ok
+.
+<p>-1. not ok</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4441
+
+.
+- foo
+
+ bar
+.
+<ul>
+<li>
+<p>foo</p>
+<pre><code>bar
+</code></pre>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4458
+
+.
+ 10. foo
+
+ bar
+.
+<ol start="10">
+<li>
+<p>foo</p>
+<pre><code>bar
+</code></pre>
+</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4477
+
+.
+ indented code
+
+paragraph
+
+ more code
+.
+<pre><code>indented code
+</code></pre>
+<p>paragraph</p>
+<pre><code>more code
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4492
+
+.
+1. indented code
+
+ paragraph
+
+ more code
+.
+<ol>
+<li>
+<pre><code>indented code
+</code></pre>
+<p>paragraph</p>
+<pre><code>more code
+</code></pre>
+</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4514
+
+.
+1. indented code
+
+ paragraph
+
+ more code
+.
+<ol>
+<li>
+<pre><code> indented code
+</code></pre>
+<p>paragraph</p>
+<pre><code>more code
+</code></pre>
+</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4541
+
+.
+ foo
+
+bar
+.
+<p>foo</p>
+<p>bar</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4551
+
+.
+- foo
+
+ bar
+.
+<ul>
+<li>foo</li>
+</ul>
+<p>bar</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4568
+
+.
+- foo
+
+ bar
+.
+<ul>
+<li>
+<p>foo</p>
+<p>bar</p>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4595
+
+.
+-
+ foo
+-
+ ```
+ bar
+ ```
+-
+ baz
+.
+<ul>
+<li>foo</li>
+<li>
+<pre><code>bar
+</code></pre>
+</li>
+<li>
+<pre><code>baz
+</code></pre>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4621
+
+.
+-
+ foo
+.
+<ul>
+<li>foo</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4635
+
+.
+-
+
+ foo
+.
+<ul>
+<li></li>
+</ul>
+<p>foo</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4649
+
+.
+- foo
+-
+- bar
+.
+<ul>
+<li>foo</li>
+<li></li>
+<li>bar</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4664
+
+.
+- foo
+-
+- bar
+.
+<ul>
+<li>foo</li>
+<li></li>
+<li>bar</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4679
+
+.
+1. foo
+2.
+3. bar
+.
+<ol>
+<li>foo</li>
+<li></li>
+<li>bar</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4694
+
+.
+*
+.
+<ul>
+<li></li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4704
+
+.
+foo
+*
+
+foo
+1.
+.
+<p>foo
+*</p>
+<p>foo
+1.</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4726
+
+.
+ 1. A paragraph
+ with two lines.
+
+ indented code
+
+ > A block quote.
+.
+<ol>
+<li>
+<p>A paragraph
+with two lines.</p>
+<pre><code>indented code
+</code></pre>
+<blockquote>
+<p>A block quote.</p>
+</blockquote>
+</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4750
+
+.
+ 1. A paragraph
+ with two lines.
+
+ indented code
+
+ > A block quote.
+.
+<ol>
+<li>
+<p>A paragraph
+with two lines.</p>
+<pre><code>indented code
+</code></pre>
+<blockquote>
+<p>A block quote.</p>
+</blockquote>
+</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4774
+
+.
+ 1. A paragraph
+ with two lines.
+
+ indented code
+
+ > A block quote.
+.
+<ol>
+<li>
+<p>A paragraph
+with two lines.</p>
+<pre><code>indented code
+</code></pre>
+<blockquote>
+<p>A block quote.</p>
+</blockquote>
+</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4798
+
+.
+ 1. A paragraph
+ with two lines.
+
+ indented code
+
+ > A block quote.
+.
+<pre><code>1. A paragraph
+ with two lines.
+
+ indented code
+
+ &gt; A block quote.
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4828
+
+.
+ 1. A paragraph
+with two lines.
+
+ indented code
+
+ > A block quote.
+.
+<ol>
+<li>
+<p>A paragraph
+with two lines.</p>
+<pre><code>indented code
+</code></pre>
+<blockquote>
+<p>A block quote.</p>
+</blockquote>
+</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4852
+
+.
+ 1. A paragraph
+ with two lines.
+.
+<ol>
+<li>A paragraph
+with two lines.</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4865
+
+.
+> 1. > Blockquote
+continued here.
+.
+<blockquote>
+<ol>
+<li>
+<blockquote>
+<p>Blockquote
+continued here.</p>
+</blockquote>
+</li>
+</ol>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4882
+
+.
+> 1. > Blockquote
+> continued here.
+.
+<blockquote>
+<ol>
+<li>
+<blockquote>
+<p>Blockquote
+continued here.</p>
+</blockquote>
+</li>
+</ol>
+</blockquote>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4910
+
+.
+- foo
+ - bar
+ - baz
+ - boo
+.
+<ul>
+<li>foo
+<ul>
+<li>bar
+<ul>
+<li>baz
+<ul>
+<li>boo</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4936
+
+.
+- foo
+ - bar
+ - baz
+ - boo
+.
+<ul>
+<li>foo</li>
+<li>bar</li>
+<li>baz</li>
+<li>boo</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4953
+
+.
+10) foo
+ - bar
+.
+<ol start="10">
+<li>foo
+<ul>
+<li>bar</li>
+</ul>
+</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4969
+
+.
+10) foo
+ - bar
+.
+<ol start="10">
+<li>foo</li>
+</ol>
+<ul>
+<li>bar</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4984
+
+.
+- - foo
+.
+<ul>
+<li>
+<ul>
+<li>foo</li>
+</ul>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 4997
+
+.
+1. - 2. foo
+.
+<ol>
+<li>
+<ul>
+<li>
+<ol start="2">
+<li>foo</li>
+</ol>
+</li>
+</ul>
+</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5016
+
+.
+- # Foo
+- Bar
+ ---
+ baz
+.
+<ul>
+<li>
+<h1>Foo</h1>
+</li>
+<li>
+<h2>Bar</h2>
+baz</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5252
+
+.
+- foo
+- bar
++ baz
+.
+<ul>
+<li>foo</li>
+<li>bar</li>
+</ul>
+<ul>
+<li>baz</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5267
+
+.
+1. foo
+2. bar
+3) baz
+.
+<ol>
+<li>foo</li>
+<li>bar</li>
+</ol>
+<ol start="3">
+<li>baz</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5286
+
+.
+Foo
+- bar
+- baz
+.
+<p>Foo</p>
+<ul>
+<li>bar</li>
+<li>baz</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5363
+
+.
+The number of windows in my house is
+14. The number of doors is 6.
+.
+<p>The number of windows in my house is
+14. The number of doors is 6.</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5373
+
+.
+The number of windows in my house is
+1. The number of doors is 6.
+.
+<p>The number of windows in my house is</p>
+<ol>
+<li>The number of doors is 6.</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5387
+
+.
+- foo
+
+- bar
+
+
+- baz
+.
+<ul>
+<li>
+<p>foo</p>
+</li>
+<li>
+<p>bar</p>
+</li>
+<li>
+<p>baz</p>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5408
+
+.
+- foo
+ - bar
+ - baz
+
+
+ bim
+.
+<ul>
+<li>foo
+<ul>
+<li>bar
+<ul>
+<li>
+<p>baz</p>
+<p>bim</p>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5438
+
+.
+- foo
+- bar
+
+<!-- -->
+
+- baz
+- bim
+.
+<ul>
+<li>foo</li>
+<li>bar</li>
+</ul>
+<!-- -->
+<ul>
+<li>baz</li>
+<li>bim</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5459
+
+.
+- foo
+
+ notcode
+
+- foo
+
+<!-- -->
+
+ code
+.
+<ul>
+<li>
+<p>foo</p>
+<p>notcode</p>
+</li>
+<li>
+<p>foo</p>
+</li>
+</ul>
+<!-- -->
+<pre><code>code
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5490
+
+.
+- a
+ - b
+ - c
+ - d
+ - e
+ - f
+- g
+.
+<ul>
+<li>a</li>
+<li>b</li>
+<li>c</li>
+<li>d</li>
+<li>e</li>
+<li>f</li>
+<li>g</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5511
+
+.
+1. a
+
+ 2. b
+
+ 3. c
+.
+<ol>
+<li>
+<p>a</p>
+</li>
+<li>
+<p>b</p>
+</li>
+<li>
+<p>c</p>
+</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5535
+
+.
+- a
+ - b
+ - c
+ - d
+ - e
+.
+<ul>
+<li>a</li>
+<li>b</li>
+<li>c</li>
+<li>d
+- e</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5555
+
+.
+1. a
+
+ 2. b
+
+ 3. c
+.
+<ol>
+<li>
+<p>a</p>
+</li>
+<li>
+<p>b</p>
+</li>
+</ol>
+<pre><code>3. c
+</code></pre>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5578
+
+.
+- a
+- b
+
+- c
+.
+<ul>
+<li>
+<p>a</p>
+</li>
+<li>
+<p>b</p>
+</li>
+<li>
+<p>c</p>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5600
+
+.
+* a
+*
+
+* c
+.
+<ul>
+<li>
+<p>a</p>
+</li>
+<li></li>
+<li>
+<p>c</p>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5622
+
+.
+- a
+- b
+
+ c
+- d
+.
+<ul>
+<li>
+<p>a</p>
+</li>
+<li>
+<p>b</p>
+<p>c</p>
+</li>
+<li>
+<p>d</p>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5644
+
+.
+- a
+- b
+
+ [ref]: /url
+- d
+.
+<ul>
+<li>
+<p>a</p>
+</li>
+<li>
+<p>b</p>
+</li>
+<li>
+<p>d</p>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5667
+
+.
+- a
+- ```
+ b
+
+
+ ```
+- c
+.
+<ul>
+<li>a</li>
+<li>
+<pre><code>b
+
+
+</code></pre>
+</li>
+<li>c</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5693
+
+.
+- a
+ - b
+
+ c
+- d
+.
+<ul>
+<li>a
+<ul>
+<li>
+<p>b</p>
+<p>c</p>
+</li>
+</ul>
+</li>
+<li>d</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5717
+
+.
+* a
+ > b
+ >
+* c
+.
+<ul>
+<li>a
+<blockquote>
+<p>b</p>
+</blockquote>
+</li>
+<li>c</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5737
+
+.
+- a
+ > b
+ ```
+ c
+ ```
+- d
+.
+<ul>
+<li>a
+<blockquote>
+<p>b</p>
+</blockquote>
+<pre><code>c
+</code></pre>
+</li>
+<li>d</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5760
+
+.
+- a
+.
+<ul>
+<li>a</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5769
+
+.
+- a
+ - b
+.
+<ul>
+<li>a
+<ul>
+<li>b</li>
+</ul>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5786
+
+.
+1. ```
+ foo
+ ```
+
+ bar
+.
+<ol>
+<li>
+<pre><code>foo
+</code></pre>
+<p>bar</p>
+</li>
+</ol>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5805
+
+.
+* foo
+ * bar
+
+ baz
+.
+<ul>
+<li>
+<p>foo</p>
+<ul>
+<li>bar</li>
+</ul>
+<p>baz</p>
+</li>
+</ul>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5823
+
+.
+- a
+ - b
+ - c
+
+- d
+ - e
+ - f
+.
+<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>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5857
+
+.
+`hi`lo`
+.
+<p><code>hi</code>lo`</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5889
+
+.
+`foo`
+.
+<p><code>foo</code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5900
+
+.
+`` foo ` bar ``
+.
+<p><code>foo ` bar</code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5910
+
+.
+` `` `
+.
+<p><code>``</code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5918
+
+.
+` `` `
+.
+<p><code> `` </code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5927
+
+.
+` a`
+.
+<p><code> a</code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5936
+
+.
+` b `
+.
+<p><code> b </code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5944
+
+.
+` `
+` `
+.
+<p><code> </code>
+<code> </code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5955
+
+.
+``
+foo
+bar
+baz
+``
+.
+<p><code>foo bar baz</code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5965
+
+.
+``
+foo
+``
+.
+<p><code>foo </code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5976
+
+.
+`foo bar
+baz`
+.
+<p><code>foo bar baz</code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 5993
+
+.
+`foo\`bar`
+.
+<p><code>foo\</code>bar`</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6004
+
+.
+``foo`bar``
+.
+<p><code>foo`bar</code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6010
+
+.
+` foo `` bar `
+.
+<p><code>foo `` bar</code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6022
+
+.
+*foo`*`
+.
+<p>*foo<code>*</code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6031
+
+.
+[not a `link](/foo`)
+.
+<p>[not a <code>link](/foo</code>)</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6041
+
+.
+`<a href="`">`
+.
+<p><code>&lt;a href=&quot;</code>&quot;&gt;`</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6050
+
+.
+<a href="`">`
+.
+<p><a href="`">`</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6059
+
+.
+`<http://foo.bar.`baz>`
+.
+<p><code>&lt;http://foo.bar.</code>baz&gt;`</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6068
+
+.
+<http://foo.bar.`baz>`
+.
+<p><a href="http://foo.bar.%60baz">http://foo.bar.`baz</a>`</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6078
+
+.
+```foo``
+.
+<p>```foo``</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6085
+
+.
+`foo
+.
+<p>`foo</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6094
+
+.
+`foo``bar``
+.
+<p>`foo<code>bar</code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6311
+
+.
+*foo bar*
+.
+<p><em>foo bar</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6321
+
+.
+a * foo bar*
+.
+<p>a * foo bar*</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6332
+
+.
+a*"foo"*
+.
+<p>a*&quot;foo&quot;*</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6341
+
+.
+* a *
+.
+<p>* a *</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6350
+
+.
+foo*bar*
+.
+<p>foo<em>bar</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6357
+
+.
+5*6*78
+.
+<p>5<em>6</em>78</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6366
+
+.
+_foo bar_
+.
+<p><em>foo bar</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6376
+
+.
+_ foo bar_
+.
+<p>_ foo bar_</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6386
+
+.
+a_"foo"_
+.
+<p>a_&quot;foo&quot;_</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6395
+
+.
+foo_bar_
+.
+<p>foo_bar_</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6402
+
+.
+5_6_78
+.
+<p>5_6_78</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6409
+
+.
+пристаням_стремятся_
+.
+<p>пристаням_стремятся_</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6419
+
+.
+aa_"bb"_cc
+.
+<p>aa_&quot;bb&quot;_cc</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6430
+
+.
+foo-_(bar)_
+.
+<p>foo-<em>(bar)</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6442
+
+.
+_foo*
+.
+<p>_foo*</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6452
+
+.
+*foo bar *
+.
+<p>*foo bar *</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6461
+
+.
+*foo bar
+*
+.
+<p>*foo bar
+*</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6474
+
+.
+*(*foo)
+.
+<p>*(*foo)</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6484
+
+.
+*(*foo*)*
+.
+<p><em>(<em>foo</em>)</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6493
+
+.
+*foo*bar
+.
+<p><em>foo</em>bar</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6506
+
+.
+_foo bar _
+.
+<p>_foo bar _</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6516
+
+.
+_(_foo)
+.
+<p>_(_foo)</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6525
+
+.
+_(_foo_)_
+.
+<p><em>(<em>foo</em>)</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6534
+
+.
+_foo_bar
+.
+<p>_foo_bar</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6541
+
+.
+_пристаням_стремятся
+.
+<p>_пристаням_стремятся</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6548
+
+.
+_foo_bar_baz_
+.
+<p><em>foo_bar_baz</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6559
+
+.
+_(bar)_.
+.
+<p><em>(bar)</em>.</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6568
+
+.
+**foo bar**
+.
+<p><strong>foo bar</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6578
+
+.
+** foo bar**
+.
+<p>** foo bar**</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6589
+
+.
+a**"foo"**
+.
+<p>a**&quot;foo&quot;**</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6598
+
+.
+foo**bar**
+.
+<p>foo<strong>bar</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6607
+
+.
+__foo bar__
+.
+<p><strong>foo bar</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6617
+
+.
+__ foo bar__
+.
+<p>__ foo bar__</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6625
+
+.
+__
+foo bar__
+.
+<p>__
+foo bar__</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6637
+
+.
+a__"foo"__
+.
+<p>a__&quot;foo&quot;__</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6646
+
+.
+foo__bar__
+.
+<p>foo__bar__</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6653
+
+.
+5__6__78
+.
+<p>5__6__78</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6660
+
+.
+пристаням__стремятся__
+.
+<p>пристаням__стремятся__</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6667
+
+.
+__foo, __bar__, baz__
+.
+<p><strong>foo, <strong>bar</strong>, baz</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6678
+
+.
+foo-__(bar)__
+.
+<p>foo-<strong>(bar)</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6691
+
+.
+**foo bar **
+.
+<p>**foo bar **</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6704
+
+.
+**(**foo)
+.
+<p>**(**foo)</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6714
+
+.
+*(**foo**)*
+.
+<p><em>(<strong>foo</strong>)</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6721
+
+.
+**Gomphocarpus (*Gomphocarpus physocarpus*, syn.
+*Asclepias physocarpa*)**
+.
+<p><strong>Gomphocarpus (<em>Gomphocarpus physocarpus</em>, syn.
+<em>Asclepias physocarpa</em>)</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6730
+
+.
+**foo "*bar*" foo**
+.
+<p><strong>foo &quot;<em>bar</em>&quot; foo</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6739
+
+.
+**foo**bar
+.
+<p><strong>foo</strong>bar</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6751
+
+.
+__foo bar __
+.
+<p>__foo bar __</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6761
+
+.
+__(__foo)
+.
+<p>__(__foo)</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6771
+
+.
+_(__foo__)_
+.
+<p><em>(<strong>foo</strong>)</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6780
+
+.
+__foo__bar
+.
+<p>__foo__bar</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6787
+
+.
+__пристаням__стремятся
+.
+<p>__пристаням__стремятся</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6794
+
+.
+__foo__bar__baz__
+.
+<p><strong>foo__bar__baz</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6805
+
+.
+__(bar)__.
+.
+<p><strong>(bar)</strong>.</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6817
+
+.
+*foo [bar](/url)*
+.
+<p><em>foo <a href="/url">bar</a></em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6824
+
+.
+*foo
+bar*
+.
+<p><em>foo
+bar</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6836
+
+.
+_foo __bar__ baz_
+.
+<p><em>foo <strong>bar</strong> baz</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6843
+
+.
+_foo _bar_ baz_
+.
+<p><em>foo <em>bar</em> baz</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6850
+
+.
+__foo_ bar_
+.
+<p><em><em>foo</em> bar</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6857
+
+.
+*foo *bar**
+.
+<p><em>foo <em>bar</em></em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6864
+
+.
+*foo **bar** baz*
+.
+<p><em>foo <strong>bar</strong> baz</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6870
+
+.
+*foo**bar**baz*
+.
+<p><em>foo<strong>bar</strong>baz</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6894
+
+.
+*foo**bar*
+.
+<p><em>foo**bar</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6907
+
+.
+***foo** bar*
+.
+<p><em><strong>foo</strong> bar</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6914
+
+.
+*foo **bar***
+.
+<p><em>foo <strong>bar</strong></em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6921
+
+.
+*foo**bar***
+.
+<p><em>foo<strong>bar</strong></em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6932
+
+.
+foo***bar***baz
+.
+<p>foo<em><strong>bar</strong></em>baz</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6938
+
+.
+foo******bar*********baz
+.
+<p>foo<strong><strong><strong>bar</strong></strong></strong>***baz</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6947
+
+.
+*foo **bar *baz* bim** bop*
+.
+<p><em>foo <strong>bar <em>baz</em> bim</strong> bop</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6954
+
+.
+*foo [*bar*](/url)*
+.
+<p><em>foo <a href="/url"><em>bar</em></a></em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6963
+
+.
+** is not an empty emphasis
+.
+<p>** is not an empty emphasis</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6970
+
+.
+**** is not an empty strong emphasis
+.
+<p>**** is not an empty strong emphasis</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6983
+
+.
+**foo [bar](/url)**
+.
+<p><strong>foo <a href="/url">bar</a></strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 6990
+
+.
+**foo
+bar**
+.
+<p><strong>foo
+bar</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7002
+
+.
+__foo _bar_ baz__
+.
+<p><strong>foo <em>bar</em> baz</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7009
+
+.
+__foo __bar__ baz__
+.
+<p><strong>foo <strong>bar</strong> baz</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7016
+
+.
+____foo__ bar__
+.
+<p><strong><strong>foo</strong> bar</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7023
+
+.
+**foo **bar****
+.
+<p><strong>foo <strong>bar</strong></strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7030
+
+.
+**foo *bar* baz**
+.
+<p><strong>foo <em>bar</em> baz</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7037
+
+.
+**foo*bar*baz**
+.
+<p><strong>foo<em>bar</em>baz</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7044
+
+.
+***foo* bar**
+.
+<p><strong><em>foo</em> bar</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7051
+
+.
+**foo *bar***
+.
+<p><strong>foo <em>bar</em></strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7060
+
+.
+**foo *bar **baz**
+bim* bop**
+.
+<p><strong>foo <em>bar <strong>baz</strong>
+bim</em> bop</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7069
+
+.
+**foo [*bar*](/url)**
+.
+<p><strong>foo <a href="/url"><em>bar</em></a></strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7078
+
+.
+__ is not an empty emphasis
+.
+<p>__ is not an empty emphasis</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7085
+
+.
+____ is not an empty strong emphasis
+.
+<p>____ is not an empty strong emphasis</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7095
+
+.
+foo ***
+.
+<p>foo ***</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7102
+
+.
+foo *\**
+.
+<p>foo <em>*</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7109
+
+.
+foo *_*
+.
+<p>foo <em>_</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7116
+
+.
+foo *****
+.
+<p>foo *****</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7123
+
+.
+foo **\***
+.
+<p>foo <strong>*</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7130
+
+.
+foo **_**
+.
+<p>foo <strong>_</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7141
+
+.
+**foo*
+.
+<p>*<em>foo</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7148
+
+.
+*foo**
+.
+<p><em>foo</em>*</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7155
+
+.
+***foo**
+.
+<p>*<strong>foo</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7162
+
+.
+****foo*
+.
+<p>***<em>foo</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7169
+
+.
+**foo***
+.
+<p><strong>foo</strong>*</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7176
+
+.
+*foo****
+.
+<p><em>foo</em>***</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7186
+
+.
+foo ___
+.
+<p>foo ___</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7193
+
+.
+foo _\__
+.
+<p>foo <em>_</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7200
+
+.
+foo _*_
+.
+<p>foo <em>*</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7207
+
+.
+foo _____
+.
+<p>foo _____</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7214
+
+.
+foo __\___
+.
+<p>foo <strong>_</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7221
+
+.
+foo __*__
+.
+<p>foo <strong>*</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7228
+
+.
+__foo_
+.
+<p>_<em>foo</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7239
+
+.
+_foo__
+.
+<p><em>foo</em>_</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7246
+
+.
+___foo__
+.
+<p>_<strong>foo</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7253
+
+.
+____foo_
+.
+<p>___<em>foo</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7260
+
+.
+__foo___
+.
+<p><strong>foo</strong>_</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7267
+
+.
+_foo____
+.
+<p><em>foo</em>___</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7277
+
+.
+**foo**
+.
+<p><strong>foo</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7284
+
+.
+*_foo_*
+.
+<p><em><em>foo</em></em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7291
+
+.
+__foo__
+.
+<p><strong>foo</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7298
+
+.
+_*foo*_
+.
+<p><em><em>foo</em></em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7308
+
+.
+****foo****
+.
+<p><strong><strong>foo</strong></strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7315
+
+.
+____foo____
+.
+<p><strong><strong>foo</strong></strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7326
+
+.
+******foo******
+.
+<p><strong><strong><strong>foo</strong></strong></strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7335
+
+.
+***foo***
+.
+<p><em><strong>foo</strong></em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7342
+
+.
+_____foo_____
+.
+<p><em><strong><strong>foo</strong></strong></em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7351
+
+.
+*foo _bar* baz_
+.
+<p><em>foo _bar</em> baz_</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7358
+
+.
+*foo __bar *baz bim__ bam*
+.
+<p><em>foo <strong>bar *baz bim</strong> bam</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7367
+
+.
+**foo **bar baz**
+.
+<p>**foo <strong>bar baz</strong></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7374
+
+.
+*foo *bar baz*
+.
+<p>*foo <em>bar baz</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7383
+
+.
+*[bar*](/url)
+.
+<p>*<a href="/url">bar*</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7390
+
+.
+_foo [bar_](/url)
+.
+<p>_foo <a href="/url">bar_</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7397
+
+.
+*<img src="foo" title="*"/>
+.
+<p>*<img src="foo" title="*"/></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7404
+
+.
+**<a href="**">
+.
+<p>**<a href="**"></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7411
+
+.
+__<a href="__">
+.
+<p>__<a href="__"></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7418
+
+.
+*a `*`*
+.
+<p><em>a <code>*</code></em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7425
+
+.
+_a `_`_
+.
+<p><em>a <code>_</code></em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7432
+
+.
+**a<http://foo.bar/?q=**>
+.
+<p>**a<a href="http://foo.bar/?q=**">http://foo.bar/?q=**</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7439
+
+.
+__a<http://foo.bar/?q=__>
+.
+<p>__a<a href="http://foo.bar/?q=__">http://foo.bar/?q=__</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7527
+
+.
+[link](/uri "title")
+.
+<p><a href="/uri" title="title">link</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7537
+
+.
+[link](/uri)
+.
+<p><a href="/uri">link</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7543
+
+.
+[](./target.md)
+.
+<p><a href="./target.md"></a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7550
+
+.
+[link]()
+.
+<p><a href="">link</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7557
+
+.
+[link](<>)
+.
+<p><a href="">link</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7564
+
+.
+[]()
+.
+<p><a href=""></a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7573
+
+.
+[link](/my uri)
+.
+<p>[link](/my uri)</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7579
+
+.
+[link](</my uri>)
+.
+<p><a href="/my%20uri">link</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7588
+
+.
+[link](foo
+bar)
+.
+<p>[link](foo
+bar)</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7596
+
+.
+[link](<foo
+bar>)
+.
+<p>[link](<foo
+bar>)</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7607
+
+.
+[a](<b)c>)
+.
+<p><a href="b)c">a</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7615
+
+.
+[link](<foo\>)
+.
+<p>[link](&lt;foo&gt;)</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7624
+
+.
+[a](<b)c
+[a](<b)c>
+[a](<b>c)
+.
+<p>[a](&lt;b)c
+[a](&lt;b)c&gt;
+[a](<b>c)</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7636
+
+.
+[link](\(foo\))
+.
+<p><a href="(foo)">link</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7645
+
+.
+[link](foo(and(bar)))
+.
+<p><a href="foo(and(bar))">link</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7654
+
+.
+[link](foo(and(bar))
+.
+<p>[link](foo(and(bar))</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7661
+
+.
+[link](foo\(and\(bar\))
+.
+<p><a href="foo(and(bar)">link</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7668
+
+.
+[link](<foo(and(bar)>)
+.
+<p><a href="foo(and(bar)">link</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7678
+
+.
+[link](foo\)\:)
+.
+<p><a href="foo):">link</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7687
+
+.
+[link](#fragment)
+
+[link](http://example.com#fragment)
+
+[link](http://example.com?foo=3#frag)
+.
+<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>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7703
+
+.
+[link](foo\bar)
+.
+<p><a href="foo%5Cbar">link</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7719
+
+.
+[link](foo%20b&auml;)
+.
+<p><a href="foo%20b%C3%A4">link</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7730
+
+.
+[link]("title")
+.
+<p><a href="%22title%22">link</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7739
+
+.
+[link](/url "title")
+[link](/url 'title')
+[link](/url (title))
+.
+<p><a href="/url" title="title">link</a>
+<a href="/url" title="title">link</a>
+<a href="/url" title="title">link</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7753
+
+.
+[link](/url "title \"&quot;")
+.
+<p><a href="/url" title="title &quot;&quot;">link</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7764
+
+.
+[link](/url "title")
+.
+<p><a href="/url%C2%A0%22title%22">link</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7773
+
+.
+[link](/url "title "and" title")
+.
+<p>[link](/url &quot;title &quot;and&quot; title&quot;)</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7782
+
+.
+[link](/url 'title "and" title')
+.
+<p><a href="/url" title="title &quot;and&quot; title">link</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7807
+
+.
+[link]( /uri
+ "title" )
+.
+<p><a href="/uri" title="title">link</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7818
+
+.
+[link] (/uri)
+.
+<p>[link] (/uri)</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7828
+
+.
+[link [foo [bar]]](/uri)
+.
+<p><a href="/uri">link [foo [bar]]</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7835
+
+.
+[link] bar](/uri)
+.
+<p>[link] bar](/uri)</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7842
+
+.
+[link [bar](/uri)
+.
+<p>[link <a href="/uri">bar</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7849
+
+.
+[link \[bar](/uri)
+.
+<p><a href="/uri">link [bar</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7858
+
+.
+[link *foo **bar** `#`*](/uri)
+.
+<p><a href="/uri">link <em>foo <strong>bar</strong> <code>#</code></em></a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7865
+
+.
+[![moon](moon.jpg)](/uri)
+.
+<p><a href="/uri"><img src="moon.jpg" alt="moon" /></a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7874
+
+.
+[foo [bar](/uri)](/uri)
+.
+<p>[foo <a href="/uri">bar</a>](/uri)</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7881
+
+.
+[foo *[bar [baz](/uri)](/uri)*](/uri)
+.
+<p>[foo <em>[bar <a href="/uri">baz</a>](/uri)</em>](/uri)</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7888
+
+.
+![[[foo](uri1)](uri2)](uri3)
+.
+<p><img src="uri3" alt="[foo](uri2)" /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7898
+
+.
+*[foo*](/uri)
+.
+<p>*<a href="/uri">foo*</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7905
+
+.
+[foo *bar](baz*)
+.
+<p><a href="baz*">foo *bar</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7915
+
+.
+*foo [bar* baz]
+.
+<p><em>foo [bar</em> baz]</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7925
+
+.
+[foo <bar attr="](baz)">
+.
+<p>[foo <bar attr="](baz)"></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7932
+
+.
+[foo`](/uri)`
+.
+<p>[foo<code>](/uri)</code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7939
+
+.
+[foo<http://example.com/?search=](uri)>
+.
+<p>[foo<a href="http://example.com/?search=%5D(uri)">http://example.com/?search=](uri)</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7977
+
+.
+[foo][bar]
+
+[bar]: /url "title"
+.
+<p><a href="/url" title="title">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 7992
+
+.
+[link [foo [bar]]][ref]
+
+[ref]: /uri
+.
+<p><a href="/uri">link [foo [bar]]</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8001
+
+.
+[link \[bar][ref]
+
+[ref]: /uri
+.
+<p><a href="/uri">link [bar</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8012
+
+.
+[link *foo **bar** `#`*][ref]
+
+[ref]: /uri
+.
+<p><a href="/uri">link <em>foo <strong>bar</strong> <code>#</code></em></a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8021
+
+.
+[![moon](moon.jpg)][ref]
+
+[ref]: /uri
+.
+<p><a href="/uri"><img src="moon.jpg" alt="moon" /></a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8032
+
+.
+[foo [bar](/uri)][ref]
+
+[ref]: /uri
+.
+<p>[foo <a href="/uri">bar</a>]<a href="/uri">ref</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8041
+
+.
+[foo *bar [baz][ref]*][ref]
+
+[ref]: /uri
+.
+<p>[foo <em>bar <a href="/uri">baz</a></em>]<a href="/uri">ref</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8056
+
+.
+*[foo*][ref]
+
+[ref]: /uri
+.
+<p>*<a href="/uri">foo*</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8065
+
+.
+[foo *bar][ref]*
+
+[ref]: /uri
+.
+<p><a href="/uri">foo *bar</a>*</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8077
+
+.
+[foo <bar attr="][ref]">
+
+[ref]: /uri
+.
+<p>[foo <bar attr="][ref]"></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8086
+
+.
+[foo`][ref]`
+
+[ref]: /uri
+.
+<p>[foo<code>][ref]</code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8095
+
+.
+[foo<http://example.com/?search=][ref]>
+
+[ref]: /uri
+.
+<p>[foo<a href="http://example.com/?search=%5D%5Bref%5D">http://example.com/?search=][ref]</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8106
+
+.
+[foo][BaR]
+
+[bar]: /url "title"
+.
+<p><a href="/url" title="title">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8117
+
+.
+[ẞ]
+
+[SS]: /url
+.
+<p><a href="/url">ẞ</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8129
+
+.
+[Foo
+ bar]: /url
+
+[Baz][Foo bar]
+.
+<p><a href="/url">Baz</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8142
+
+.
+[foo] [bar]
+
+[bar]: /url "title"
+.
+<p>[foo] <a href="/url" title="title">bar</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8151
+
+.
+[foo]
+[bar]
+
+[bar]: /url "title"
+.
+<p>[foo]
+<a href="/url" title="title">bar</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8192
+
+.
+[foo]: /url1
+
+[foo]: /url2
+
+[bar][foo]
+.
+<p><a href="/url1">bar</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8207
+
+.
+[bar][foo\!]
+
+[foo!]: /url
+.
+<p>[bar][foo!]</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8219
+
+.
+[foo][ref[]
+
+[ref[]: /uri
+.
+<p>[foo][ref[]</p>
+<p>[ref[]: /uri</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8229
+
+.
+[foo][ref[bar]]
+
+[ref[bar]]: /uri
+.
+<p>[foo][ref[bar]]</p>
+<p>[ref[bar]]: /uri</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8239
+
+.
+[[[foo]]]
+
+[[[foo]]]: /url
+.
+<p>[[[foo]]]</p>
+<p>[[[foo]]]: /url</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8249
+
+.
+[foo][ref\[]
+
+[ref\[]: /uri
+.
+<p><a href="/uri">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8260
+
+.
+[bar\\]: /uri
+
+[bar\\]
+.
+<p><a href="/uri">bar\</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8272
+
+.
+[]
+
+[]: /uri
+.
+<p>[]</p>
+<p>[]: /uri</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8282
+
+.
+[
+ ]
+
+[
+ ]: /uri
+.
+<p>[
+]</p>
+<p>[
+]: /uri</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8305
+
+.
+[foo][]
+
+[foo]: /url "title"
+.
+<p><a href="/url" title="title">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8314
+
+.
+[*foo* bar][]
+
+[*foo* bar]: /url "title"
+.
+<p><a href="/url" title="title"><em>foo</em> bar</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8325
+
+.
+[Foo][]
+
+[foo]: /url "title"
+.
+<p><a href="/url" title="title">Foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8338
+
+.
+[foo]
+[]
+
+[foo]: /url "title"
+.
+<p><a href="/url" title="title">foo</a>
+[]</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8358
+
+.
+[foo]
+
+[foo]: /url "title"
+.
+<p><a href="/url" title="title">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8367
+
+.
+[*foo* bar]
+
+[*foo* bar]: /url "title"
+.
+<p><a href="/url" title="title"><em>foo</em> bar</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8376
+
+.
+[[*foo* bar]]
+
+[*foo* bar]: /url "title"
+.
+<p>[<a href="/url" title="title"><em>foo</em> bar</a>]</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8385
+
+.
+[[bar [foo]
+
+[foo]: /url
+.
+<p>[[bar <a href="/url">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8396
+
+.
+[Foo]
+
+[foo]: /url "title"
+.
+<p><a href="/url" title="title">Foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8407
+
+.
+[foo] bar
+
+[foo]: /url
+.
+<p><a href="/url">foo</a> bar</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8419
+
+.
+\[foo]
+
+[foo]: /url "title"
+.
+<p>[foo]</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8431
+
+.
+[foo*]: /url
+
+*[foo*]
+.
+<p>*<a href="/url">foo*</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8443
+
+.
+[foo][bar]
+
+[foo]: /url1
+[bar]: /url2
+.
+<p><a href="/url2">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8452
+
+.
+[foo][]
+
+[foo]: /url1
+.
+<p><a href="/url1">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8462
+
+.
+[foo]()
+
+[foo]: /url1
+.
+<p><a href="">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8470
+
+.
+[foo](not a link)
+
+[foo]: /url1
+.
+<p><a href="/url1">foo</a>(not a link)</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8481
+
+.
+[foo][bar][baz]
+
+[baz]: /url
+.
+<p>[foo]<a href="/url">bar</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8493
+
+.
+[foo][bar][baz]
+
+[baz]: /url1
+[bar]: /url2
+.
+<p><a href="/url2">foo</a><a href="/url1">baz</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8506
+
+.
+[foo][bar][baz]
+
+[baz]: /url1
+[foo]: /url2
+.
+<p>[foo]<a href="/url1">bar</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8529
+
+.
+![foo](/url "title")
+.
+<p><img src="/url" alt="foo" title="title" /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8536
+
+.
+![foo *bar*]
+
+[foo *bar*]: train.jpg "train & tracks"
+.
+<p><img src="train.jpg" alt="foo bar" title="train &amp; tracks" /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8545
+
+.
+![foo ![bar](/url)](/url2)
+.
+<p><img src="/url2" alt="foo bar" /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8552
+
+.
+![foo [bar](/url)](/url2)
+.
+<p><img src="/url2" alt="foo bar" /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8566
+
+.
+![foo *bar*][]
+
+[foo *bar*]: train.jpg "train & tracks"
+.
+<p><img src="train.jpg" alt="foo bar" title="train &amp; tracks" /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8575
+
+.
+![foo *bar*][foobar]
+
+[FOOBAR]: train.jpg "train & tracks"
+.
+<p><img src="train.jpg" alt="foo bar" title="train &amp; tracks" /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8584
+
+.
+![foo](train.jpg)
+.
+<p><img src="train.jpg" alt="foo" /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8591
+
+.
+My ![foo bar](/path/to/train.jpg "title" )
+.
+<p>My <img src="/path/to/train.jpg" alt="foo bar" title="title" /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8598
+
+.
+![foo](<url>)
+.
+<p><img src="url" alt="foo" /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8605
+
+.
+![](/url)
+.
+<p><img src="/url" alt="" /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8614
+
+.
+![foo][bar]
+
+[bar]: /url
+.
+<p><img src="/url" alt="foo" /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8623
+
+.
+![foo][bar]
+
+[BAR]: /url
+.
+<p><img src="/url" alt="foo" /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8634
+
+.
+![foo][]
+
+[foo]: /url "title"
+.
+<p><img src="/url" alt="foo" title="title" /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8643
+
+.
+![*foo* bar][]
+
+[*foo* bar]: /url "title"
+.
+<p><img src="/url" alt="foo bar" title="title" /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8654
+
+.
+![Foo][]
+
+[foo]: /url "title"
+.
+<p><img src="/url" alt="Foo" title="title" /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8666
+
+.
+![foo]
+[]
+
+[foo]: /url "title"
+.
+<p><img src="/url" alt="foo" title="title" />
+[]</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8679
+
+.
+![foo]
+
+[foo]: /url "title"
+.
+<p><img src="/url" alt="foo" title="title" /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8688
+
+.
+![*foo* bar]
+
+[*foo* bar]: /url "title"
+.
+<p><img src="/url" alt="foo bar" title="title" /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8699
+
+.
+![[foo]]
+
+[[foo]]: /url "title"
+.
+<p>![[foo]]</p>
+<p>[[foo]]: /url &quot;title&quot;</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8711
+
+.
+![Foo]
+
+[foo]: /url "title"
+.
+<p><img src="/url" alt="Foo" title="title" /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8723
+
+.
+!\[foo]
+
+[foo]: /url "title"
+.
+<p>![foo]</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8735
+
+.
+\![foo]
+
+[foo]: /url "title"
+.
+<p>!<a href="/url" title="title">foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8768
+
+.
+<http://foo.bar.baz>
+.
+<p><a href="http://foo.bar.baz">http://foo.bar.baz</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8775
+
+.
+<http://foo.bar.baz/test?q=hello&id=22&boolean>
+.
+<p><a href="http://foo.bar.baz/test?q=hello&amp;id=22&amp;boolean">http://foo.bar.baz/test?q=hello&amp;id=22&amp;boolean</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8782
+
+.
+<irc://foo.bar:2233/baz>
+.
+<p><a href="irc://foo.bar:2233/baz">irc://foo.bar:2233/baz</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8791
+
+.
+<MAILTO:FOO@BAR.BAZ>
+.
+<p><a href="MAILTO:FOO@BAR.BAZ">MAILTO:FOO@BAR.BAZ</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8803
+
+.
+<a+b+c:d>
+.
+<p><a href="a+b+c:d">a+b+c:d</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8810
+
+.
+<made-up-scheme://foo,bar>
+.
+<p><a href="made-up-scheme://foo,bar">made-up-scheme://foo,bar</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8817
+
+.
+<http://../>
+.
+<p><a href="http://../">http://../</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8824
+
+.
+<localhost:5001/foo>
+.
+<p><a href="localhost:5001/foo">localhost:5001/foo</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8833
+
+.
+<http://foo.bar/baz bim>
+.
+<p>&lt;http://foo.bar/baz bim&gt;</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8842
+
+.
+<http://example.com/\[\>
+.
+<p><a href="http://example.com/%5C%5B%5C">http://example.com/\[\</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8864
+
+.
+<foo@bar.example.com>
+.
+<p><a href="mailto:foo@bar.example.com">foo@bar.example.com</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8871
+
+.
+<foo+special@Bar.baz-bar0.com>
+.
+<p><a href="mailto:foo+special@Bar.baz-bar0.com">foo+special@Bar.baz-bar0.com</a></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8880
+
+.
+<foo\+@bar.example.com>
+.
+<p>&lt;foo+@bar.example.com&gt;</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8889
+
+.
+<>
+.
+<p>&lt;&gt;</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8896
+
+.
+< http://foo.bar >
+.
+<p>&lt; http://foo.bar &gt;</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8903
+
+.
+<m:abc>
+.
+<p>&lt;m:abc&gt;</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8910
+
+.
+<foo.bar.baz>
+.
+<p>&lt;foo.bar.baz&gt;</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8917
+
+.
+http://example.com
+.
+<p>http://example.com</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 8924
+
+.
+foo@bar.example.com
+.
+<p>foo@bar.example.com</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9005
+
+.
+<a><bab><c2c>
+.
+<p><a><bab><c2c></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9014
+
+.
+<a/><b2/>
+.
+<p><a/><b2/></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9023
+
+.
+<a /><b2
+data="foo" >
+.
+<p><a /><b2
+data="foo" ></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9034
+
+.
+<a foo="bar" bam = 'baz <em>"</em>'
+_boolean zoop:33=zoop:33 />
+.
+<p><a foo="bar" bam = 'baz <em>"</em>'
+_boolean zoop:33=zoop:33 /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9045
+
+.
+Foo <responsive-image src="foo.jpg" />
+.
+<p>Foo <responsive-image src="foo.jpg" /></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9054
+
+.
+<33> <__>
+.
+<p>&lt;33&gt; &lt;__&gt;</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9063
+
+.
+<a h*#ref="hi">
+.
+<p>&lt;a h*#ref=&quot;hi&quot;&gt;</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9072
+
+.
+<a href="hi'> <a href=hi'>
+.
+<p>&lt;a href=&quot;hi'&gt; &lt;a href=hi'&gt;</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9081
+
+.
+< a><
+foo><bar/ >
+<foo bar=baz
+bim!bop />
+.
+<p>&lt; a&gt;&lt;
+foo&gt;&lt;bar/ &gt;
+&lt;foo bar=baz
+bim!bop /&gt;</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9096
+
+.
+<a href='bar'title=title>
+.
+<p>&lt;a href='bar'title=title&gt;</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9105
+
+.
+</a></foo >
+.
+<p></a></foo ></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9114
+
+.
+</a href="foo">
+.
+<p>&lt;/a href=&quot;foo&quot;&gt;</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9123
+
+.
+foo <!-- this is a
+comment - with hyphen -->
+.
+<p>foo <!-- this is a
+comment - with hyphen --></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9132
+
+.
+foo <!-- not a comment -- two hyphens -->
+.
+<p>foo &lt;!-- not a comment -- two hyphens --&gt;</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9141
+
+.
+foo <!--> foo -->
+
+foo <!-- foo--->
+.
+<p>foo &lt;!--&gt; foo --&gt;</p>
+<p>foo &lt;!-- foo---&gt;</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9153
+
+.
+foo <?php echo $a; ?>
+.
+<p>foo <?php echo $a; ?></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9162
+
+.
+foo <!ELEMENT br EMPTY>
+.
+<p>foo <!ELEMENT br EMPTY></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9171
+
+.
+foo <![CDATA[>&<]]>
+.
+<p>foo <![CDATA[>&<]]></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9181
+
+.
+foo <a href="&ouml;">
+.
+<p>foo <a href="&ouml;"></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9190
+
+.
+foo <a href="\*">
+.
+<p>foo <a href="\*"></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9197
+
+.
+<a href="\"">
+.
+<p>&lt;a href=&quot;&quot;&quot;&gt;</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9211
+
+.
+foo
+baz
+.
+<p>foo<br />
+baz</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9223
+
+.
+foo\
+baz
+.
+<p>foo<br />
+baz</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9234
+
+.
+foo
+baz
+.
+<p>foo<br />
+baz</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9245
+
+.
+foo
+ bar
+.
+<p>foo<br />
+bar</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9254
+
+.
+foo\
+ bar
+.
+<p>foo<br />
+bar</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9266
+
+.
+*foo
+bar*
+.
+<p><em>foo<br />
+bar</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9275
+
+.
+*foo\
+bar*
+.
+<p><em>foo<br />
+bar</em></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9286
+
+.
+`code
+span`
+.
+<p><code>code span</code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9294
+
+.
+`code\
+span`
+.
+<p><code>code\ span</code></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9304
+
+.
+<a href="foo
+bar">
+.
+<p><a href="foo
+bar"></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9313
+
+.
+<a href="foo\
+bar">
+.
+<p><a href="foo\
+bar"></p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9326
+
+.
+foo\
+.
+<p>foo\</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9333
+
+.
+foo
+.
+<p>foo</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9340
+
+.
+### foo\
+.
+<h3>foo\</h3>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9347
+
+.
+### foo
+.
+<h3>foo</h3>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9362
+
+.
+foo
+baz
+.
+<p>foo
+baz</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9374
+
+.
+foo
+ baz
+.
+<p>foo
+baz</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9394
+
+.
+hello $.;'there
+.
+<p>hello $.;'there</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9401
+
+.
+Foo χρῆν
+.
+<p>Foo χρῆν</p>
+.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+src line: 9410
+
+.
+Multiple spaces
+.
+<p>Multiple spaces</p>
+.
+
diff --git a/tests/test_port/fixtures/fatal.md b/tests/test_port/fixtures/fatal.md
new file mode 100644
index 0000000..7b2afcf
--- /dev/null
+++ b/tests/test_port/fixtures/fatal.md
@@ -0,0 +1,41 @@
+Should not throw exception on invalid chars in URL (`*` not allowed in path) [malformed URI]
+.
+[foo](<&#x25;test>)
+.
+<p><a href="%25test">foo</a></p>
+.
+
+
+Should not throw exception on broken utf-8 sequence in URL [malformed URI]
+.
+[foo](%C3)
+.
+<p><a href="%C3">foo</a></p>
+.
+
+
+Should not throw exception on broken utf-16 surrogates sequence in URL [malformed URI]
+.
+[foo](&#xD800;)
+.
+<p><a href="&amp;#xD800;">foo</a></p>
+.
+
+
+Should not hang comments regexp
+.
+foo <!--- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ->
+
+foo <!------------------------------------------------------------------->
+.
+<p>foo &lt;!— xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -&gt;</p>
+<p>foo &lt;!-------------------------------------------------------------------&gt;</p>
+.
+
+
+Should not hang cdata regexp
+.
+foo <![CDATA[ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ]>
+.
+<p>foo &lt;![CDATA[ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ]&gt;</p>
+.
diff --git a/tests/test_port/fixtures/issue-fixes.md b/tests/test_port/fixtures/issue-fixes.md
new file mode 100644
index 0000000..0c693b0
--- /dev/null
+++ b/tests/test_port/fixtures/issue-fixes.md
@@ -0,0 +1,38 @@
+#31 empty lines after certain lists raises exception:
+.
+> a
+
+- b
+
+
+.
+<blockquote>
+<p>a</p>
+</blockquote>
+<ul>
+<li>b</li>
+</ul>
+.
+
+#50 blank lines after block quotes
+.
+> A Block Quote
+
+> Another Block Quote
+
+
+.
+<blockquote>
+<p>A Block Quote</p>
+</blockquote>
+<blockquote>
+<p>Another Block Quote</p>
+</blockquote>
+.
+
+#80 UnicodeError with codepoints larger than 0xFFFF
+.
+&#x1F4AC;
+.
+<p>💬</p>
+.
diff --git a/tests/test_port/fixtures/linkify.md b/tests/test_port/fixtures/linkify.md
new file mode 100644
index 0000000..9edb78f
--- /dev/null
+++ b/tests/test_port/fixtures/linkify.md
@@ -0,0 +1,99 @@
+linkify
+.
+url http://www.youtube.com/watch?v=5Jt5GEr4AYg.
+.
+<p>url <a href="http://www.youtube.com/watch?v=5Jt5GEr4AYg">http://www.youtube.com/watch?v=5Jt5GEr4AYg</a>.</p>
+.
+
+
+don't touch text in links
+.
+[https://example.com](https://example.com)
+.
+<p><a href="https://example.com">https://example.com</a></p>
+.
+
+
+don't touch text in autolinks
+.
+<https://example.com>
+.
+<p><a href="https://example.com">https://example.com</a></p>
+.
+
+
+don't touch text in html <a> tags
+.
+<a href="https://example.com">https://example.com</a>
+.
+<p><a href="https://example.com">https://example.com</a></p>
+.
+
+
+match links without protocol
+.
+www.example.org
+.
+<p><a href="http://www.example.org">www.example.org</a></p>
+.
+
+
+emails
+.
+test@example.com
+
+mailto:test@example.com
+.
+<p><a href="mailto:test@example.com">test@example.com</a></p>
+<p><a href="mailto:test@example.com">mailto:test@example.com</a></p>
+.
+
+
+typorgapher should not break href
+.
+http://example.com/(c)
+.
+<p><a href="http://example.com/(c)">http://example.com/(c)</a></p>
+.
+
+before line
+.
+before
+github.com
+.
+<p>before
+<a href="http://github.com">github.com</a></p>
+.
+
+after line
+.
+github.com
+after
+.
+<p><a href="http://github.com">github.com</a>
+after</p>
+.
+
+before after lines
+.
+before
+github.com
+after
+.
+<p>before
+<a href="http://github.com">github.com</a>
+after</p>
+.
+
+before after lines with blank line
+.
+before
+
+github.com
+
+after
+.
+<p>before</p>
+<p><a href="http://github.com">github.com</a></p>
+<p>after</p>
+. \ No newline at end of file
diff --git a/tests/test_port/fixtures/normalize.md b/tests/test_port/fixtures/normalize.md
new file mode 100644
index 0000000..4a00508
--- /dev/null
+++ b/tests/test_port/fixtures/normalize.md
@@ -0,0 +1,39 @@
+
+Encode link destination, decode text inside it:
+
+.
+<http://example.com/α%CE%B2γ%CE%B4>
+.
+<p><a href="http://example.com/%CE%B1%CE%B2%CE%B3%CE%B4">http://example.com/αβγδ</a></p>
+.
+
+.
+[foo](http://example.com/α%CE%B2γ%CE%B4)
+.
+<p><a href="http://example.com/%CE%B1%CE%B2%CE%B3%CE%B4">foo</a></p>
+.
+
+
+Keep %25 as is because decoding it may break urls, #720
+.
+<https://www.google.com/search?q=hello%2E%252Ehello>
+.
+<p><a href="https://www.google.com/search?q=hello%2E%252Ehello">https://www.google.com/search?q=hello.%252Ehello</a></p>
+.
+
+
+Don't encode domains in unknown schemas:
+
+.
+[](skype:γγγ)
+.
+<p><a href="skype:%CE%B3%CE%B3%CE%B3"></a></p>
+.
+
+
+Square brackets are allowed
+.
+[foo](https://bar]baz.org)
+.
+<p><a href="https://bar%5Dbaz.org">foo</a></p>
+.
diff --git a/tests/test_port/fixtures/proto.md b/tests/test_port/fixtures/proto.md
new file mode 100644
index 0000000..87fdccf
--- /dev/null
+++ b/tests/test_port/fixtures/proto.md
@@ -0,0 +1,16 @@
+.
+[__proto__]
+
+[__proto__]: blah
+.
+<p><a href="blah"><strong>proto</strong></a></p>
+.
+
+
+.
+[hasOwnProperty]
+
+[hasOwnProperty]: blah
+.
+<p><a href="blah">hasOwnProperty</a></p>
+.
diff --git a/tests/test_port/fixtures/punycode.md b/tests/test_port/fixtures/punycode.md
new file mode 100644
index 0000000..c726e82
--- /dev/null
+++ b/tests/test_port/fixtures/punycode.md
@@ -0,0 +1,77 @@
+Should decode punycode:
+
+.
+<http://xn--n3h.net/>
+.
+<p><a href="http://xn--n3h.net/">http://☃.net/</a></p>
+.
+
+.
+<http://☃.net/>
+.
+<p><a href="http://xn--n3h.net/">http://☃.net/</a></p>
+.
+
+Invalid punycode:
+
+.
+<http://xn--xn.com/>
+.
+<p><a href="http://xn--xn.com/">http://xn--xn.com/</a></p>
+.
+
+Invalid punycode (non-ascii):
+
+.
+<http://xn--γ.com/>
+.
+<p><a href="http://xn--xn---emd.com/">http://xn--γ.com/</a></p>
+.
+
+Two slashes should start a domain:
+
+.
+[](//☃.net/)
+.
+<p><a href="//xn--n3h.net/"></a></p>
+.
+
+Should auto-add protocol to autolinks:
+
+.
+test google.com foo
+.
+<p>test <a href="http://google.com">google.com</a> foo</p>
+.
+
+Should support IDN in autolinks:
+
+.
+test http://xn--n3h.net/ foo
+.
+<p>test <a href="http://xn--n3h.net/">http://☃.net/</a> foo</p>
+.
+
+.
+test http://☃.net/ foo
+.
+<p>test <a href="http://xn--n3h.net/">http://☃.net/</a> foo</p>
+.
+
+.
+test //xn--n3h.net/ foo
+.
+<p>test <a href="//xn--n3h.net/">//☃.net/</a> foo</p>
+.
+
+.
+test xn--n3h.net foo
+.
+<p>test <a href="http://xn--n3h.net">☃.net</a> foo</p>
+.
+
+.
+test xn--n3h@xn--n3h.net foo
+.
+<p>test <a href="mailto:xn--n3h@xn--n3h.net">xn--n3h@☃.net</a> foo</p>
+.
diff --git a/tests/test_port/fixtures/smartquotes.md b/tests/test_port/fixtures/smartquotes.md
new file mode 100644
index 0000000..70378b8
--- /dev/null
+++ b/tests/test_port/fixtures/smartquotes.md
@@ -0,0 +1,166 @@
+Should parse nested quotes:
+.
+"foo 'bar' baz"
+
+'foo 'bar' baz'
+.
+<p>“foo ‘bar’ baz”</p>
+<p>‘foo ‘bar’ baz’</p>
+.
+
+
+Should not overlap quotes:
+.
+'foo "bar' baz"
+.
+<p>‘foo &quot;bar’ baz&quot;</p>
+.
+
+
+Should match quotes on the same level:
+.
+"foo *bar* baz"
+.
+<p>“foo <em>bar</em> baz”</p>
+.
+
+
+Should handle adjacent nested quotes:
+.
+'"double in single"'
+
+"'single in double'"
+.
+<p>‘“double in single”’</p>
+<p>“‘single in double’”</p>
+.
+
+
+
+Should not match quotes on different levels:
+.
+*"foo* bar"
+
+"foo *bar"*
+
+*"foo* bar *baz"*
+.
+<p><em>&quot;foo</em> bar&quot;</p>
+<p>&quot;foo <em>bar&quot;</em></p>
+<p><em>&quot;foo</em> bar <em>baz&quot;</em></p>
+.
+
+Smartquotes should not overlap with other tags:
+.
+*foo "bar* *baz" quux*
+.
+<p><em>foo &quot;bar</em> <em>baz&quot; quux</em></p>
+.
+
+
+Should try and find matching quote in this case:
+.
+"foo "bar 'baz"
+.
+<p>&quot;foo “bar 'baz”</p>
+.
+
+
+Should not touch 'inches' in quotes:
+.
+"Monitor 21"" and "Monitor""
+.
+<p>“Monitor 21&quot;” and “Monitor”&quot;</p>
+.
+
+
+Should render an apostrophe as a rsquo:
+.
+This isn't and can't be the best approach to implement this...
+.
+<p>This isn’t and can’t be the best approach to implement this…</p>
+.
+
+
+Apostrophe could end the word, that's why original smartypants replaces all of them as rsquo:
+.
+users' stuff
+.
+<p>users’ stuff</p>
+.
+
+Quotes between punctuation chars:
+
+.
+"(hai)".
+.
+<p>“(hai)”.</p>
+.
+
+Quotes at the start/end of the tokens:
+.
+"*foo* bar"
+
+"foo *bar*"
+
+"*foo bar*"
+.
+<p>“<em>foo</em> bar”</p>
+<p>“foo <em>bar</em>”</p>
+<p>“<em>foo bar</em>”</p>
+.
+
+Should treat softbreak as a space:
+.
+"this"
+and "that".
+
+"this" and
+"that".
+.
+<p>“this”
+and “that”.</p>
+<p>“this” and
+“that”.</p>
+.
+
+Should treat hardbreak as a space:
+.
+"this"\
+and "that".
+
+"this" and\
+"that".
+.
+<p>“this”<br />
+and “that”.</p>
+<p>“this” and<br />
+“that”.</p>
+.
+
+Should allow quotes adjacent to other punctuation characters, #643:
+.
+The dog---"'man's' best friend"
+.
+<p>The dog—“‘man’s’ best friend”</p>
+.
+
+Should parse quotes adjacent to code block, #677:
+.
+"test `code`"
+
+"`code` test"
+.
+<p>“test <code>code</code>”</p>
+<p>“<code>code</code> test”</p>
+.
+
+Should parse quotes adjacent to inline html, #677:
+.
+"test <br>"
+
+"<br> test"
+.
+<p>“test <br>”</p>
+<p>“<br> test”</p>
+. \ No newline at end of file
diff --git a/tests/test_port/fixtures/strikethrough.md b/tests/test_port/fixtures/strikethrough.md
new file mode 100644
index 0000000..ca15b6f
--- /dev/null
+++ b/tests/test_port/fixtures/strikethrough.md
@@ -0,0 +1,136 @@
+.
+~~Strikeout~~
+.
+<p><s>Strikeout</s></p>
+.
+
+.
+x ~~~~foo~~ bar~~
+.
+<p>x <s><s>foo</s> bar</s></p>
+.
+
+.
+x ~~foo ~~bar~~~~
+.
+<p>x <s>foo <s>bar</s></s></p>
+.
+
+.
+x ~~~~foo~~~~
+.
+<p>x <s><s>foo</s></s></p>
+.
+
+.
+x ~~a ~~foo~~~~~~~~~~~bar~~ b~~
+
+x ~~a ~~foo~~~~~~~~~~~~bar~~ b~~
+.
+<p>x <s>a <s>foo</s></s>~~~<s><s>bar</s> b</s></p>
+<p>x <s>a <s>foo</s></s>~~~~<s><s>bar</s> b</s></p>
+.
+
+
+Strikeouts have the same priority as emphases:
+.
+**~~test**~~
+
+~~**test~~**
+.
+<p><strong>~~test</strong>~~</p>
+<p><s>**test</s>**</p>
+.
+
+
+Strikeouts have the same priority as emphases with respect to links:
+.
+[~~link]()~~
+
+~~[link~~]()
+.
+<p><a href="">~~link</a>~~</p>
+<p>~~<a href="">link~~</a></p>
+.
+
+
+Strikeouts have the same priority as emphases with respect to backticks:
+.
+~~`code~~`
+
+`~~code`~~
+.
+<p>~~<code>code~~</code></p>
+<p><code>~~code</code>~~</p>
+.
+
+
+Nested strikeouts:
+.
+~~foo ~~bar~~ baz~~
+
+~~f **o ~~o b~~ a** r~~
+.
+<p><s>foo <s>bar</s> baz</s></p>
+<p><s>f <strong>o <s>o b</s> a</strong> r</s></p>
+.
+
+
+Should not have a whitespace between text and "~~":
+.
+foo ~~ bar ~~ baz
+.
+<p>foo ~~ bar ~~ baz</p>
+.
+
+
+Should parse strikethrough within link tags:
+.
+[~~foo~~]()
+.
+<p><a href=""><s>foo</s></a></p>
+.
+
+
+Newline should be considered a whitespace:
+.
+~~test
+~~
+
+~~
+test~~
+
+~~
+test
+~~
+.
+<p>~~test
+~~</p>
+<p>~~
+test~~</p>
+<p>~~
+test
+~~</p>
+.
+
+From CommonMark test suite, replacing `**` with our marker:
+
+.
+a~~"foo"~~
+.
+<p>a~~&quot;foo&quot;~~</p>
+.
+
+Coverage: single tilde
+.
+~a~
+.
+<p>~a~</p>
+.
+
+Regression test for #742:
+.
+-~~~~;~~~~~~
+.
+<p>-<s><s>;</s></s>~~</p>
+.
diff --git a/tests/test_port/fixtures/tables.md b/tests/test_port/fixtures/tables.md
new file mode 100644
index 0000000..cf83708
--- /dev/null
+++ b/tests/test_port/fixtures/tables.md
@@ -0,0 +1,896 @@
+Simple:
+.
+| Heading 1 | Heading 2
+| --------- | ---------
+| Cell 1 | Cell 2
+| Cell 3 | Cell 4
+.
+<table>
+<thead>
+<tr>
+<th>Heading 1</th>
+<th>Heading 2</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>Cell 1</td>
+<td>Cell 2</td>
+</tr>
+<tr>
+<td>Cell 3</td>
+<td>Cell 4</td>
+</tr>
+</tbody>
+</table>
+.
+
+
+Column alignment:
+.
+| Header 1 | Header 2 | Header 3 | Header 4 |
+| :------: | -------: | :------- | -------- |
+| Cell 1 | Cell 2 | Cell 3 | Cell 4 |
+| Cell 5 | Cell 6 | Cell 7 | Cell 8 |
+.
+<table>
+<thead>
+<tr>
+<th style="text-align:center">Header 1</th>
+<th style="text-align:right">Header 2</th>
+<th style="text-align:left">Header 3</th>
+<th>Header 4</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td style="text-align:center">Cell 1</td>
+<td style="text-align:right">Cell 2</td>
+<td style="text-align:left">Cell 3</td>
+<td>Cell 4</td>
+</tr>
+<tr>
+<td style="text-align:center">Cell 5</td>
+<td style="text-align:right">Cell 6</td>
+<td style="text-align:left">Cell 7</td>
+<td>Cell 8</td>
+</tr>
+</tbody>
+</table>
+.
+
+
+Nested emphases:
+.
+Header 1|Header 2|Header 3|Header 4
+:-------|:------:|-------:|--------
+Cell 1 |Cell 2 |Cell 3 |Cell 4
+*Cell 5*|Cell 6 |Cell 7 |Cell 8
+.
+<table>
+<thead>
+<tr>
+<th style="text-align:left">Header 1</th>
+<th style="text-align:center">Header 2</th>
+<th style="text-align:right">Header 3</th>
+<th>Header 4</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td style="text-align:left">Cell 1</td>
+<td style="text-align:center">Cell 2</td>
+<td style="text-align:right">Cell 3</td>
+<td>Cell 4</td>
+</tr>
+<tr>
+<td style="text-align:left"><em>Cell 5</em></td>
+<td style="text-align:center">Cell 6</td>
+<td style="text-align:right">Cell 7</td>
+<td>Cell 8</td>
+</tr>
+</tbody>
+</table>
+.
+
+
+Nested tables inside blockquotes:
+.
+> foo|foo
+> ---|---
+> bar|bar
+baz|baz
+.
+<blockquote>
+<table>
+<thead>
+<tr>
+<th>foo</th>
+<th>foo</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>bar</td>
+<td>bar</td>
+</tr>
+</tbody>
+</table>
+</blockquote>
+<p>baz|baz</p>
+.
+
+
+Minimal one-column:
+.
+| foo
+|----
+| test2
+.
+<table>
+<thead>
+<tr>
+<th>foo</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>test2</td>
+</tr>
+</tbody>
+</table>
+.
+
+
+This is parsed as one big table:
+.
+- foo|foo
+---|---
+bar|bar
+.
+<table>
+<thead>
+<tr>
+<th>- foo</th>
+<th>foo</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>bar</td>
+<td>bar</td>
+</tr>
+</tbody>
+</table>
+.
+
+
+Second line should not contain symbols except "-", ":", "|" and " ":
+.
+foo|foo
+-----|-----s
+bar|bar
+.
+<p>foo|foo
+-----|-----s
+bar|bar</p>
+.
+
+
+Second line should contain "|" symbol:
+.
+foo|foo
+-----:-----
+bar|bar
+.
+<p>foo|foo
+-----:-----
+bar|bar</p>
+.
+
+
+Second line should not have empty columns in the middle:
+.
+foo|foo
+-----||-----
+bar|bar
+.
+<p>foo|foo
+-----||-----
+bar|bar</p>
+.
+
+
+Wrong alignment symbol position:
+.
+foo|foo
+-----|-::-
+bar|bar
+.
+<p>foo|foo
+-----|-::-
+bar|bar</p>
+.
+
+
+Title line should contain "|" symbol:
+.
+foo
+-----|-----
+bar|bar
+.
+<p>foo
+-----|-----
+bar|bar</p>
+.
+
+
+Allow tabs as a separator on 2nd line
+.
+| foo | bar |
+| --- | --- |
+| baz | quux |
+.
+<table>
+<thead>
+<tr>
+<th>foo</th>
+<th>bar</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>baz</td>
+<td>quux</td>
+</tr>
+</tbody>
+</table>
+.
+
+
+Should terminate paragraph:
+.
+paragraph
+foo|foo
+---|---
+bar|bar
+.
+<p>paragraph</p>
+<table>
+<thead>
+<tr>
+<th>foo</th>
+<th>foo</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>bar</td>
+<td>bar</td>
+</tr>
+</tbody>
+</table>
+.
+
+
+Table no longer terminated via row without "|" symbol:
+.
+foo|foo
+---|---
+paragraph
+.
+<table>
+<thead>
+<tr>
+<th>foo</th>
+<th>foo</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>paragraph</td>
+<td></td>
+</tr>
+</tbody>
+</table>
+.
+
+
+Delimiter escaping (deprecated):
+.
+| Heading 1 \\\\| Heading 2
+| --------- | ---------
+| Cell\|1\|| Cell\|2
+\| Cell\\\|3 \\| Cell\|4
+.
+<p>| Heading 1 \\| Heading 2
+| --------- | ---------
+| Cell|1|| Cell|2
+| Cell\|3 \| Cell|4</p>
+.
+
+Pipes inside backticks DO split cells, unless `\` escaped:
+.
+| Heading 1 | Heading 2
+| --------- | ---------
+| `Cell\|1` | Cell 2
+| `Cell|3` | Cell 4
+.
+<table>
+<thead>
+<tr>
+<th>Heading 1</th>
+<th>Heading 2</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td><code>Cell|1</code></td>
+<td>Cell 2</td>
+</tr>
+<tr>
+<td>`Cell</td>
+<td>3`</td>
+</tr>
+</tbody>
+</table>
+.
+
+Unclosed backticks don't count
+.
+| Heading 1 | Heading 2
+| --------- | ---------
+| Cell 1 | Cell 2
+| `Cell 3| Cell 4
+.
+<table>
+<thead>
+<tr>
+<th>Heading 1</th>
+<th>Heading 2</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>Cell 1</td>
+<td>Cell 2</td>
+</tr>
+<tr>
+<td>`Cell 3</td>
+<td>Cell 4</td>
+</tr>
+</tbody>
+</table>
+.
+
+Another complicated backticks case
+.
+| Heading 1 | Heading 2
+| --------- | ---------
+| Cell 1 | Cell 2
+| \\\`|\\\`
+.
+<table>
+<thead>
+<tr>
+<th>Heading 1</th>
+<th>Heading 2</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>Cell 1</td>
+<td>Cell 2</td>
+</tr>
+<tr>
+<td>\`</td>
+<td>\`</td>
+</tr>
+</tbody>
+</table>
+.
+
+`\` in tables should not count as escaped backtick
+.
+# | 1 | 2
+--|--|--
+x | `\` | `x`
+.
+<table>
+<thead>
+<tr>
+<th>#</th>
+<th>1</th>
+<th>2</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>x</td>
+<td><code>\</code></td>
+<td><code>x</code></td>
+</tr>
+</tbody>
+</table>
+.
+
+Tables should handle escaped backticks
+.
+# | 1 | 2
+--|--|--
+x | \`\` | `x`
+.
+<table>
+<thead>
+<tr>
+<th>#</th>
+<th>1</th>
+<th>2</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>x</td>
+<td>``</td>
+<td><code>x</code></td>
+</tr>
+</tbody>
+</table>
+.
+
+
+An amount of rows might be different across table (issue #171), but header and alignment rows must be equal (#697):
+.
+| 1 | 2 |
+| :-----: | :-----: |
+| 3 | 4 | 5 | 6 |
+.
+<table>
+<thead>
+<tr>
+<th style="text-align:center">1</th>
+<th style="text-align:center">2</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td style="text-align:center">3</td>
+<td style="text-align:center">4</td>
+</tr>
+</tbody>
+</table>
+.
+
+
+An amount of rows might be different across the table #2:
+.
+| 1 | 2 | 3 | 4 |
+| :-----: | :-----: | :-----: | :-----: |
+| 5 | 6 |
+.
+<table>
+<thead>
+<tr>
+<th style="text-align:center">1</th>
+<th style="text-align:center">2</th>
+<th style="text-align:center">3</th>
+<th style="text-align:center">4</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td style="text-align:center">5</td>
+<td style="text-align:center">6</td>
+<td style="text-align:center"></td>
+<td style="text-align:center"></td>
+</tr>
+</tbody>
+</table>
+.
+
+
+Allow one-column tables (issue #171):
+.
+| foo |
+:-----:
+| bar |
+.
+<table>
+<thead>
+<tr>
+<th style="text-align:center">foo</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td style="text-align:center">bar</td>
+</tr>
+</tbody>
+</table>
+.
+
+
+Allow indented tables (issue #325):
+.
+ | Col1a | Col2a |
+ | ----- | ----- |
+ | Col1b | Col2b |
+.
+<table>
+<thead>
+<tr>
+<th>Col1a</th>
+<th>Col2a</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>Col1b</td>
+<td>Col2b</td>
+</tr>
+</tbody>
+</table>
+.
+
+
+Tables should not be indented more than 4 spaces (1st line):
+.
+ | Col1a | Col2a |
+ | ----- | ----- |
+ | Col1b | Col2b |
+.
+<pre><code>| Col1a | Col2a |
+</code></pre>
+<p>| ----- | ----- |
+| Col1b | Col2b |</p>
+.
+
+
+Tables should not be indented more than 4 spaces (2nd line):
+.
+ | Col1a | Col2a |
+ | ----- | ----- |
+ | Col1b | Col2b |
+.
+<p>| Col1a | Col2a |
+| ----- | ----- |
+| Col1b | Col2b |</p>
+.
+
+
+Tables should not be indented more than 4 spaces (3rd line):
+.
+ | Col1a | Col2a |
+ | ----- | ----- |
+ | Col1b | Col2b |
+.
+<table>
+<thead>
+<tr>
+<th>Col1a</th>
+<th>Col2a</th>
+</tr>
+</thead>
+</table>
+<pre><code>| Col1b | Col2b |
+</code></pre>
+.
+
+
+Allow tables with empty body:
+.
+ | Col1a | Col2a |
+ | ----- | ----- |
+.
+<table>
+<thead>
+<tr>
+<th>Col1a</th>
+<th>Col2a</th>
+</tr>
+</thead>
+</table>
+.
+
+
+Align row should be at least as large as any actual rows:
+.
+Col1a | Col1b | Col1c
+----- | -----
+Col2a | Col2b | Col2c
+.
+<p>Col1a | Col1b | Col1c
+----- | -----
+Col2a | Col2b | Col2c</p>
+.
+
+Escaped pipes inside backticks don't split cells:
+.
+| Heading 1 | Heading 2
+| --------- | ---------
+| Cell 1 | Cell 2
+| `Cell 3\|` | Cell 4
+.
+<table>
+<thead>
+<tr>
+<th>Heading 1</th>
+<th>Heading 2</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>Cell 1</td>
+<td>Cell 2</td>
+</tr>
+<tr>
+<td><code>Cell 3|</code></td>
+<td>Cell 4</td>
+</tr>
+</tbody>
+</table>
+.
+
+Escape before escaped Pipes inside backticks don't split cells:
+.
+| Heading 1 | Heading 2
+| --------- | ---------
+| Cell 1 | Cell 2
+| `Cell 3\\|` | Cell 4
+.
+<table>
+<thead>
+<tr>
+<th>Heading 1</th>
+<th>Heading 2</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>Cell 1</td>
+<td>Cell 2</td>
+</tr>
+<tr>
+<td><code>Cell 3\|</code></td>
+<td>Cell 4</td>
+</tr>
+</tbody>
+</table>
+.
+
+Regression test for #721, table in a list indented with tabs:
+.
+- Level 1
+
+ - Level 2
+
+ | Column 1 | Column 2 |
+ | -------- | -------- |
+ | abcdefgh | ijklmnop |
+.
+<ul>
+<li>
+<p>Level 1</p>
+<ul>
+<li>
+<p>Level 2</p>
+<table>
+<thead>
+<tr>
+<th>Column 1</th>
+<th>Column 2</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>abcdefgh</td>
+<td>ijklmnop</td>
+</tr>
+</tbody>
+</table>
+</li>
+</ul>
+</li>
+</ul>
+.
+
+Table without any columns is not a table, #724
+.
+|
+|
+|
+.
+<p>|
+|
+|</p>
+.
+
+GFM 4.10 Tables (extension), Example 198
+.
+| foo | bar |
+| --- | --- |
+| baz | bim |
+.
+<table>
+<thead>
+<tr>
+<th>foo</th>
+<th>bar</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>baz</td>
+<td>bim</td>
+</tr>
+</tbody>
+</table>
+.
+
+GFM 4.10 Tables (extension), Example 199
+.
+| abc | defghi |
+:-: | -----------:
+bar | baz
+.
+<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>
+.
+
+GFM 4.10 Tables (extension), Example 200
+.
+| f\|oo |
+| ------ |
+| b `\|` az |
+| b **\|** im |
+.
+<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>
+.
+
+GFM 4.10 Tables (extension), Example 201
+.
+| abc | def |
+| --- | --- |
+| bar | baz |
+> bar
+.
+<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>
+.
+
+GFM 4.10 Tables (extension), Example 202
+.
+| abc | def |
+| --- | --- |
+| bar | baz |
+bar
+
+bar
+.
+<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>
+.
+
+GFM 4.10 Tables (extension), Example 203
+.
+| abc | def |
+| --- |
+| bar |
+.
+<p>| abc | def |
+| --- |
+| bar |</p>
+.
+
+GFM 4.10 Tables (extension), Example 204
+.
+| abc | def |
+| --- | --- |
+| bar |
+| bar | baz | boo |
+.
+<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>
+.
+
+GFM 4.10 Tables (extension), Example 205
+.
+| abc | def |
+| --- | --- |
+.
+<table>
+<thead>
+<tr>
+<th>abc</th>
+<th>def</th>
+</tr>
+</thead>
+</table>
+.
+
+A list takes precedence in case of ambiguity
+.
+a | b
+- | -
+1 | 2
+.
+<p>a | b</p>
+<ul>
+<li>| -
+1 | 2</li>
+</ul>
+.
diff --git a/tests/test_port/fixtures/typographer.md b/tests/test_port/fixtures/typographer.md
new file mode 100644
index 0000000..39154ed
--- /dev/null
+++ b/tests/test_port/fixtures/typographer.md
@@ -0,0 +1,115 @@
+.
+(bad)
+.
+<p>(bad)</p>
+.
+
+copyright (Lower)
+.
+(c)
+.
+<p>©</p>
+.
+
+copyright (Upper)
+.
+(C)
+.
+<p>©</p>
+.
+
+copyright
+.
+(c) (C)
+.
+<p>© ©</p>
+.
+
+
+reserved
+.
+(r) (R)
+.
+<p>® ®</p>
+.
+
+
+trademark
+.
+(tm) (TM)
+.
+<p>™ ™</p>
+.
+
+
+paragraph
+.
+(p) (P)
+.
+<p>§ §</p>
+.
+
+
+plus-minus
+.
++-5
+.
+<p>±5</p>
+.
+
+
+ellipsis
+.
+test.. test... test..... test?..... test!....
+.
+<p>test… test… test… test?.. test!..</p>
+.
+
+
+dupes
+.
+!!!!!! ???? ,,
+.
+<p>!!! ??? ,</p>
+.
+
+
+dupes-ellipsis
+.
+!... ?... ,... !!!!!!.... ????.... ,,...
+.
+<p>!.. ?.. ,… !!!.. ???.. ,…</p>
+.
+
+
+dashes
+.
+---markdownit --- super---
+
+markdownit---awesome
+
+abc ----
+
+--markdownit -- super--
+
+markdownit--awesome
+.
+<p>—markdownit — super—</p>
+<p>markdownit—awesome</p>
+<p>abc ----</p>
+<p>–markdownit – super–</p>
+<p>markdownit–awesome</p>
+.
+
+regression tests for #624
+.
+1---2---3
+
+1--2--3
+
+1 -- -- 3
+.
+<p>1—2—3</p>
+<p>1–2–3</p>
+<p>1 – – 3</p>
+.
diff --git a/tests/test_port/fixtures/xss.md b/tests/test_port/fixtures/xss.md
new file mode 100644
index 0000000..7c0512e
--- /dev/null
+++ b/tests/test_port/fixtures/xss.md
@@ -0,0 +1,128 @@
+.
+[normal link](javascript)
+.
+<p><a href="javascript">normal link</a></p>
+.
+
+
+Should not allow some protocols in links and images
+.
+[xss link](javascript:alert(1))
+
+[xss link](JAVASCRIPT:alert(1))
+
+[xss link](vbscript:alert(1))
+
+[xss link](VBSCRIPT:alert(1))
+
+[xss link](file:///123)
+.
+<p>[xss link](javascript:alert(1))</p>
+<p>[xss link](JAVASCRIPT:alert(1))</p>
+<p>[xss link](vbscript:alert(1))</p>
+<p>[xss link](VBSCRIPT:alert(1))</p>
+<p>[xss link](file:///123)</p>
+.
+
+
+.
+[xss link](&#34;&#62;&#60;script&#62;alert&#40;&#34;xss&#34;&#41;&#60;/script&#62;)
+
+[xss link](&#74;avascript:alert(1))
+
+[xss link](&#x26;#74;avascript:alert(1))
+
+[xss link](\&#74;avascript:alert(1))
+.
+<p><a href="%22%3E%3Cscript%3Ealert(%22xss%22)%3C/script%3E">xss link</a></p>
+<p>[xss link](Javascript:alert(1))</p>
+<p><a href="&amp;#74;avascript:alert(1)">xss link</a></p>
+<p><a href="&amp;#74;avascript:alert(1)">xss link</a></p>
+.
+
+.
+[xss link](<javascript:alert(1)>)
+.
+<p>[xss link](&lt;javascript:alert(1)&gt;)</p>
+.
+
+.
+[xss link](javascript&#x3A;alert(1))
+.
+<p>[xss link](javascript:alert(1))</p>
+.
+
+
+Should not allow data-uri except some whitelisted mimes
+.
+![](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
+.
+<p><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt=""></p>
+.
+
+.
+[xss link](data:text/html;base64,PHNjcmlwdD5hbGVydCgnWFNTJyk8L3NjcmlwdD4K)
+.
+<p>[xss link](data:text/html;base64,PHNjcmlwdD5hbGVydCgnWFNTJyk8L3NjcmlwdD4K)</p>
+.
+
+.
+[normal link](/javascript:link)
+.
+<p><a href="/javascript:link">normal link</a></p>
+.
+
+
+Image parser use the same code base as link.
+.
+![xss link](javascript:alert(1))
+.
+<p>![xss link](javascript:alert(1))</p>
+.
+
+
+Autolinks
+.
+<javascript&#x3A;alert(1)>
+
+<javascript:alert(1)>
+.
+<p>&lt;javascript:alert(1)&gt;</p>
+<p>&lt;javascript:alert(1)&gt;</p>
+.
+
+
+Linkifier
+.
+javascript&#x3A;alert(1)
+
+javascript:alert(1)
+.
+<p>javascript:alert(1)</p>
+<p>javascript:alert(1)</p>
+.
+
+
+References
+.
+[test]: javascript:alert(1)
+.
+<p>[test]: javascript:alert(1)</p>
+.
+
+
+Make sure we decode entities before split:
+.
+```js&#32;custom-class
+test1
+```
+
+```js&#x0C;custom-class
+test2
+```
+.
+<pre><code class="js">test1
+</code></pre>
+<pre><code class="js">test2
+</code></pre>
+.
diff --git a/tests/test_port/test_fixtures.py b/tests/test_port/test_fixtures.py
new file mode 100644
index 0000000..5117c5e
--- /dev/null
+++ b/tests/test_port/test_fixtures.py
@@ -0,0 +1,114 @@
+from pathlib import Path
+
+import pytest
+
+from markdown_it import MarkdownIt
+from markdown_it.utils import read_fixture_file
+
+FIXTURE_PATH = Path(__file__).parent.joinpath("fixtures")
+
+
+@pytest.mark.parametrize(
+ "line,title,input,expected",
+ read_fixture_file(FIXTURE_PATH.joinpath("linkify.md")),
+)
+def test_linkify(line, title, input, expected):
+ md = MarkdownIt().enable("linkify")
+ md.options["linkify"] = True
+ text = md.render(input)
+ assert text.rstrip() == expected.rstrip()
+
+ # if not install linkify-it-py
+ md.linkify = None
+ with pytest.raises(ModuleNotFoundError):
+ md.render(input)
+
+
+@pytest.mark.parametrize(
+ "line,title,input,expected",
+ read_fixture_file(FIXTURE_PATH.joinpath("smartquotes.md")),
+)
+def test_smartquotes(line, title, input, expected):
+ md = MarkdownIt().enable("replacements").enable("smartquotes")
+ md.options["typographer"] = True
+ text = md.render(input)
+ assert text.rstrip() == expected.rstrip()
+
+
+@pytest.mark.parametrize(
+ "line,title,input,expected",
+ read_fixture_file(FIXTURE_PATH.joinpath("typographer.md")),
+)
+def test_typographer(line, title, input, expected):
+ md = MarkdownIt().enable("replacements")
+ md.options["typographer"] = True
+ text = md.render(input)
+ assert text.rstrip() == expected.rstrip()
+
+
+@pytest.mark.parametrize(
+ "line,title,input,expected", read_fixture_file(FIXTURE_PATH.joinpath("tables.md"))
+)
+def test_table(line, title, input, expected):
+ md = MarkdownIt().enable("table")
+ text = md.render(input)
+ try:
+ assert text.rstrip() == expected.rstrip()
+ except AssertionError:
+ print(text)
+ raise
+
+
+@pytest.mark.parametrize(
+ "line,title,input,expected",
+ read_fixture_file(FIXTURE_PATH.joinpath("commonmark_extras.md")),
+)
+def test_commonmark_extras(line, title, input, expected):
+ md = MarkdownIt("commonmark")
+ md.options["langPrefix"] = ""
+ text = md.render(input)
+ if text.rstrip() != expected.rstrip():
+ print(text)
+ assert text.rstrip() == expected.rstrip()
+
+
+@pytest.mark.parametrize(
+ "line,title,input,expected",
+ read_fixture_file(FIXTURE_PATH.joinpath("normalize.md")),
+)
+def test_normalize_url(line, title, input, expected):
+ md = MarkdownIt("commonmark")
+ text = md.render(input)
+ assert text.rstrip() == expected.rstrip()
+
+
+@pytest.mark.parametrize(
+ "line,title,input,expected", read_fixture_file(FIXTURE_PATH.joinpath("fatal.md"))
+)
+def test_fatal(line, title, input, expected):
+ md = MarkdownIt("commonmark").enable("replacements")
+ md.options["typographer"] = True
+ text = md.render(input)
+ if text.rstrip() != expected.rstrip():
+ print(text)
+ assert text.rstrip() == expected.rstrip()
+
+
+@pytest.mark.parametrize(
+ "line,title,input,expected",
+ read_fixture_file(FIXTURE_PATH.joinpath("strikethrough.md")),
+)
+def test_strikethrough(line, title, input, expected):
+ md = MarkdownIt().enable("strikethrough")
+ text = md.render(input)
+ assert text.rstrip() == expected.rstrip()
+
+
+@pytest.mark.parametrize(
+ "line,title,input,expected",
+ read_fixture_file(FIXTURE_PATH.joinpath("issue-fixes.md")),
+)
+def test_issue_fixes(line, title, input, expected):
+ md = MarkdownIt()
+ text = md.render(input)
+ assert text.rstrip() == expected.rstrip()
diff --git a/tests/test_port/test_misc.py b/tests/test_port/test_misc.py
new file mode 100644
index 0000000..62b5bf8
--- /dev/null
+++ b/tests/test_port/test_misc.py
@@ -0,0 +1,44 @@
+from markdown_it import MarkdownIt, presets
+
+
+def test_highlight_arguments():
+ def highlight_func(str_, lang, attrs):
+ assert lang == "a"
+ assert attrs == "b c d"
+ return "<pre><code>==" + str_ + "==</code></pre>"
+
+ conf = presets.commonmark.make()
+ conf["options"]["highlight"] = highlight_func
+ md = MarkdownIt(config=conf)
+ assert md.render("``` a b c d \nhl\n```") == "<pre><code>==hl\n==</code></pre>\n"
+
+
+def test_ordered_list_info():
+ def type_filter(tokens, type_):
+ return [t for t in tokens if t.type == type_]
+
+ md = MarkdownIt()
+
+ tokens = md.parse("1. Foo\n2. Bar\n20. Fuzz")
+ assert len(type_filter(tokens, "ordered_list_open")) == 1
+ tokens = type_filter(tokens, "list_item_open")
+ assert len(tokens) == 3
+ assert tokens[0].info == "1"
+ assert tokens[0].markup == "."
+ assert tokens[1].info == "2"
+ assert tokens[1].markup == "."
+ assert tokens[2].info == "20"
+ assert tokens[2].markup == "."
+
+ tokens = md.parse(" 1. Foo\n2. Bar\n 20. Fuzz\n 199. Flp")
+ assert len(type_filter(tokens, "ordered_list_open")) == 1
+ tokens = type_filter(tokens, "list_item_open")
+ assert len(tokens) == 4
+ assert tokens[0].info == "1"
+ assert tokens[0].markup == "."
+ assert tokens[1].info == "2"
+ assert tokens[1].markup == "."
+ assert tokens[2].info == "20"
+ assert tokens[2].markup == "."
+ assert tokens[3].info == "199"
+ assert tokens[3].markup == "."
diff --git a/tests/test_port/test_no_end_newline.py b/tests/test_port/test_no_end_newline.py
new file mode 100644
index 0000000..5e7cf82
--- /dev/null
+++ b/tests/test_port/test_no_end_newline.py
@@ -0,0 +1,27 @@
+import pytest
+
+from markdown_it import MarkdownIt
+
+
+@pytest.mark.parametrize(
+ "input,expected",
+ [
+ ("#", "<h1></h1>\n"),
+ ("###", "<h3></h3>\n"),
+ ("` `", "<p><code> </code></p>\n"),
+ ("``````", "<pre><code></code></pre>\n"),
+ ("-", "<ul>\n<li></li>\n</ul>\n"),
+ ("1.", "<ol>\n<li></li>\n</ol>\n"),
+ (">", "<blockquote></blockquote>\n"),
+ ("---", "<hr />\n"),
+ ("<h1></h1>", "<h1></h1>"),
+ ("p", "<p>p</p>\n"),
+ ("[reference]: /url", ""),
+ (" indented code block", "<pre><code>indented code block\n</code></pre>\n"),
+ ("> test\n>", "<blockquote>\n<p>test</p>\n</blockquote>\n"),
+ ],
+)
+def test_no_end_newline(input, expected):
+ md = MarkdownIt()
+ text = md.render(input)
+ assert text == expected
diff --git a/tests/test_port/test_references.py b/tests/test_port/test_references.py
new file mode 100644
index 0000000..32e389d
--- /dev/null
+++ b/tests/test_port/test_references.py
@@ -0,0 +1,53 @@
+from markdown_it import MarkdownIt
+
+
+def test_ref_definitions():
+
+ md = MarkdownIt()
+ src = "[a]: abc\n\n[b]: xyz\n\n[b]: ijk"
+ env = {}
+ tokens = md.parse(src, env)
+ assert tokens == []
+ assert env == {
+ "references": {
+ "A": {"title": "", "href": "abc", "map": [0, 1]},
+ "B": {"title": "", "href": "xyz", "map": [2, 3]},
+ },
+ "duplicate_refs": [{"href": "ijk", "label": "B", "map": [4, 5], "title": ""}],
+ }
+
+
+def test_use_existing_env(data_regression):
+ md = MarkdownIt()
+ src = "[a]\n\n[c]: ijk"
+ env = {
+ "references": {
+ "A": {"title": "", "href": "abc", "map": [0, 1]},
+ "B": {"title": "", "href": "xyz", "map": [2, 3]},
+ }
+ }
+ tokens = md.parse(src, env)
+ data_regression.check([token.as_dict() for token in tokens])
+ assert env == {
+ "references": {
+ "A": {"title": "", "href": "abc", "map": [0, 1]},
+ "B": {"title": "", "href": "xyz", "map": [2, 3]},
+ "C": {"title": "", "href": "ijk", "map": [2, 3]},
+ }
+ }
+
+
+def test_store_labels(data_regression):
+ md = MarkdownIt()
+ md.options["store_labels"] = True
+ src = "[a]\n\n![a]\n\n[a]: ijk"
+ tokens = md.parse(src)
+ data_regression.check([token.as_dict() for token in tokens])
+
+
+def test_inline_definitions(data_regression):
+ md = MarkdownIt()
+ md.options["inline_definitions"] = True
+ src = '[a]: url "title"\n- [a]: url "title"'
+ tokens = md.parse(src)
+ data_regression.check([token.as_dict() for token in tokens])
diff --git a/tests/test_port/test_references/test_inline_definitions.yml b/tests/test_port/test_references/test_inline_definitions.yml
new file mode 100644
index 0000000..5ec210b
--- /dev/null
+++ b/tests/test_port/test_references/test_inline_definitions.yml
@@ -0,0 +1,94 @@
+- attrs: null
+ block: true
+ children: null
+ content: ''
+ hidden: false
+ info: ''
+ level: 0
+ map:
+ - 0
+ - 1
+ markup: ''
+ meta:
+ id: A
+ label: a
+ title: title
+ url: url
+ nesting: 0
+ tag: ''
+ type: definition
+- attrs: null
+ block: true
+ children: null
+ content: ''
+ hidden: false
+ info: ''
+ level: 0
+ map:
+ - 1
+ - 2
+ markup: '-'
+ meta: {}
+ nesting: 1
+ tag: ul
+ type: bullet_list_open
+- attrs: null
+ block: true
+ children: null
+ content: ''
+ hidden: false
+ info: ''
+ level: 1
+ map:
+ - 1
+ - 2
+ markup: '-'
+ meta: {}
+ nesting: 1
+ tag: li
+ type: list_item_open
+- attrs: null
+ block: true
+ children: null
+ content: ''
+ hidden: false
+ info: ''
+ level: 2
+ map:
+ - 1
+ - 2
+ markup: ''
+ meta:
+ id: A
+ label: a
+ title: title
+ url: url
+ nesting: 0
+ tag: ''
+ type: definition
+- attrs: null
+ block: true
+ children: null
+ content: ''
+ hidden: false
+ info: ''
+ level: 1
+ map: null
+ markup: '-'
+ meta: {}
+ nesting: -1
+ tag: li
+ type: list_item_close
+- attrs: null
+ block: true
+ children: null
+ content: ''
+ hidden: false
+ info: ''
+ level: 0
+ map: null
+ markup: '-'
+ meta: {}
+ nesting: -1
+ tag: ul
+ type: bullet_list_close
diff --git a/tests/test_port/test_references/test_store_labels.yml b/tests/test_port/test_references/test_store_labels.yml
new file mode 100644
index 0000000..79f6f74
--- /dev/null
+++ b/tests/test_port/test_references/test_store_labels.yml
@@ -0,0 +1,159 @@
+- attrs: null
+ block: true
+ children: null
+ content: ''
+ hidden: false
+ info: ''
+ level: 0
+ map:
+ - 0
+ - 1
+ markup: ''
+ meta: {}
+ nesting: 1
+ tag: p
+ type: paragraph_open
+- attrs: null
+ block: true
+ children:
+ - attrs:
+ - - href
+ - ijk
+ block: false
+ children: null
+ content: ''
+ hidden: false
+ info: ''
+ level: 0
+ map: null
+ markup: ''
+ meta:
+ label: A
+ nesting: 1
+ tag: a
+ type: link_open
+ - attrs: null
+ block: false
+ children: null
+ content: a
+ hidden: false
+ info: ''
+ level: 1
+ map: null
+ markup: ''
+ meta: {}
+ nesting: 0
+ tag: ''
+ type: text
+ - attrs: null
+ block: false
+ children: null
+ content: ''
+ hidden: false
+ info: ''
+ level: 0
+ map: null
+ markup: ''
+ meta: {}
+ nesting: -1
+ tag: a
+ type: link_close
+ content: '[a]'
+ hidden: false
+ info: ''
+ level: 1
+ map:
+ - 0
+ - 1
+ markup: ''
+ meta: {}
+ nesting: 0
+ tag: ''
+ type: inline
+- attrs: null
+ block: true
+ children: null
+ content: ''
+ hidden: false
+ info: ''
+ level: 0
+ map: null
+ markup: ''
+ meta: {}
+ nesting: -1
+ tag: p
+ type: paragraph_close
+- attrs: null
+ block: true
+ children: null
+ content: ''
+ hidden: false
+ info: ''
+ level: 0
+ map:
+ - 2
+ - 3
+ markup: ''
+ meta: {}
+ nesting: 1
+ tag: p
+ type: paragraph_open
+- attrs: null
+ block: true
+ children:
+ - attrs:
+ - - src
+ - ijk
+ - - alt
+ - ''
+ block: false
+ children:
+ - attrs: null
+ block: false
+ children: null
+ content: a
+ hidden: false
+ info: ''
+ level: 0
+ map: null
+ markup: ''
+ meta: {}
+ nesting: 0
+ tag: ''
+ type: text
+ content: a
+ hidden: false
+ info: ''
+ level: 0
+ map: null
+ markup: ''
+ meta:
+ label: A
+ nesting: 0
+ tag: img
+ type: image
+ content: '![a]'
+ hidden: false
+ info: ''
+ level: 1
+ map:
+ - 2
+ - 3
+ markup: ''
+ meta: {}
+ nesting: 0
+ tag: ''
+ type: inline
+- attrs: null
+ block: true
+ children: null
+ content: ''
+ hidden: false
+ info: ''
+ level: 0
+ map: null
+ markup: ''
+ meta: {}
+ nesting: -1
+ tag: p
+ type: paragraph_close
diff --git a/tests/test_port/test_references/test_use_existing_env.yml b/tests/test_port/test_references/test_use_existing_env.yml
new file mode 100644
index 0000000..1a72337
--- /dev/null
+++ b/tests/test_port/test_references/test_use_existing_env.yml
@@ -0,0 +1,84 @@
+- attrs: null
+ block: true
+ children: null
+ content: ''
+ hidden: false
+ info: ''
+ level: 0
+ map:
+ - 0
+ - 1
+ markup: ''
+ meta: {}
+ nesting: 1
+ tag: p
+ type: paragraph_open
+- attrs: null
+ block: true
+ children:
+ - attrs:
+ - - href
+ - abc
+ block: false
+ children: null
+ content: ''
+ hidden: false
+ info: ''
+ level: 0
+ map: null
+ markup: ''
+ meta: {}
+ nesting: 1
+ tag: a
+ type: link_open
+ - attrs: null
+ block: false
+ children: null
+ content: a
+ hidden: false
+ info: ''
+ level: 1
+ map: null
+ markup: ''
+ meta: {}
+ nesting: 0
+ tag: ''
+ type: text
+ - attrs: null
+ block: false
+ children: null
+ content: ''
+ hidden: false
+ info: ''
+ level: 0
+ map: null
+ markup: ''
+ meta: {}
+ nesting: -1
+ tag: a
+ type: link_close
+ content: '[a]'
+ hidden: false
+ info: ''
+ level: 1
+ map:
+ - 0
+ - 1
+ markup: ''
+ meta: {}
+ nesting: 0
+ tag: ''
+ type: inline
+- attrs: null
+ block: true
+ children: null
+ content: ''
+ hidden: false
+ info: ''
+ level: 0
+ map: null
+ markup: ''
+ meta: {}
+ nesting: -1
+ tag: p
+ type: paragraph_close