diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:24:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:24:24 +0000 |
commit | 12e8343068b906f8b2afddc5569968a8a91fa5b0 (patch) | |
tree | 75cc5e05a4392ea0292251898f992a15a16b172b /tests/test_port/fixtures/commonmark_extras.md | |
parent | Initial commit. (diff) | |
download | markdown-it-py-12e8343068b906f8b2afddc5569968a8a91fa5b0.tar.xz markdown-it-py-12e8343068b906f8b2afddc5569968a8a91fa5b0.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/fixtures/commonmark_extras.md')
-rw-r--r-- | tests/test_port/fixtures/commonmark_extras.md | 696 |
1 files changed, 696 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="&" /></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="\"\b\a\r">test</a></p> +. + + +Not a closing tag +. +</ 123> +. +<p></ 123></p> +. + + + +Escaping entities in links: +. +[](<"> "&ö") + +[](<\"> "\&\ö") + +[](<\\"> "\\"\\ö") +. +<p><a href="%22" title="&ö"></a></p> +<p><a href="&quot;" title="&amp;&ouml;"></a></p> +<p><a href="%5C%22" title="\"\ö"></a></p> +. + + +Checking combination of replaceEntities and unescapeMd: +. +~~~ &&bad;\&\\& +just a funny little fence +~~~ +. +<pre><code class="&&bad;&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: +. +```  +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>[](<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. +. +*&* + +* * + +*&* +. +<p><em>&</em></p> +<p><em> </em></p> +<p><em>&</em></p> +. + + +Coverage. Escape. +. +*\a* +. +<p><em>\a</em></p> +. + + +Coverage. parseLinkDestination +. +[foo](< +bar>) + +[foo](<bar) +. +<p>[foo](< +bar>)</p> +<p>[foo](<bar)</p> +. + + +Coverage. parseLinkTitle +. +[foo](bar "ba) + +[foo](bar "ba\ +z") +. +<p>[foo](bar "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. +. +� + +� +. +<p>�</p> +<p>&#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> +. |