From 12e8343068b906f8b2afddc5569968a8a91fa5b0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 29 Apr 2024 06:24:24 +0200 Subject: Adding upstream version 2.1.0. Signed-off-by: Daniel Baumann --- tests/test_port/fixtures/commonmark_extras.md | 696 ++++++++++++++++++++++++++ 1 file changed, 696 insertions(+) create mode 100644 tests/test_port/fixtures/commonmark_extras.md (limited to 'tests/test_port/fixtures/commonmark_extras.md') 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**** +. +

**Helloworld

+. + +Issue #246. Double escaping in ALT +. +![&](#) +. +

&

+. + +Strip markdown in ALT tags +. +![*strip* [markdown __in__ alt](#)](#) +. +

strip markdown in alt

+. + +Issue #55: +. +![test] + +![test](foo bar) +. +

![test]

+

![test](foo bar)

+. + + +Reference labels: 'i̇θωkå'.toUpperCase() is 'İΘΩKÅ', but these should still be equivalent +. +[İϴΩKÅ] + +[i̇θωkå]: /url +. +

İϴΩKÅ

+. + + +Reference labels: support ligatures (equivalent according to unicode case folding) +. +[fffifl] + +[fffifl]: /url +. +

fffifl

+. + + +Issue #35. `<` should work as punctuation +. +an **(:**
+. +

an (:

+. + + +Should unescape only needed things in link destinations/titles: +. +[test](<\f\o\o\>\\>) + +[test](foo "\\\"\b\a\r") +. +

test

+

test

+. + + +Not a closing tag +. + +. +

</ 123>

+. + + + +Escaping entities in links: +. +[](<"> "&ö") + +[](<\"> "\&\ö") + +[](<\\"> "\\"\\ö") +. +

+

+

+. + + +Checking combination of replaceEntities and unescapeMd: +. +~~~ &&bad;\&\\& +just a funny little fence +~~~ +. +
just a funny little fence
+
+. + +Underscore between punctuation chars should be able to close emphasis. + +. +_(hai)_. +. +

(hai).

+. + +Regression test, should not match emphasis markers in different link tags: +. +[*b]() [c*]() +. +

*b c*

+. + +Those are two separate blockquotes: +. + - > foo + > bar +. + +
+

bar

+
+. + +Blockquote should terminate itself after paragraph continuation +. +- list + > blockquote +blockquote continuation + - next list item +. + +. + +Regression test (code block + regular paragraph) +. +> foo +> bar +. +
+
foo
+
+

bar

+
+. + +Blockquotes inside indented lists should terminate correctly +. + - a + > b + ``` + c + ``` + - d +. + +. + +Don't output empty class here: +. +``` +test +``` +. +
test
+
+. + +Setext header text supports lazy continuations: +. + - foo +bar + === +. + +. + +But setext header underline doesn't: +. + - foo + bar + === +. + +. + +Tabs should be stripped from the beginning of the line +. + foo + bar + baz +. +

foo +bar +baz

+. + +Tabs should not cause hardbreak, EOL tabs aren't stripped in commonmark 0.27 +. +foo1 +foo2 +bar +. +

foo1 +foo2
+bar

+. + +List item terminating quote should not be paragraph continuation +. +1. foo + > quote +2. bar +. +
    +
  1. foo +
    +

    quote

    +
    +
  2. +
  3. bar
  4. +
+. + +Escaped space is not allowed in link destination, commonmark/CommonMark#493. +. +[link](a\ b) +. +

[link](a\ b)

+. + +Link destination cannot contain '<' +. +[]() + +[]() +. +

[](<foo)

+

+. + +Link title cannot contain '(' when opened with it +. +[](url (xxx()) + +[](url (xxx\()) +. +

[](url (xxx())

+

+. + +Allow EOL in processing instructions, commonmark/commonmark.js#196. +. +a +. +

a

+. + +Allow meta tag in an inline context, commonmark/commonmark-spec#527. +. +City: + + + +. +

City: + + +

+. + +Coverage. Directive can terminate paragraph. +. +a +a

+* +. +

foo@bar.com

+. + + +Coverage. Unpaired nested backtick (silent mode) +. +*`foo* +. +

`foo

+. + + +Coverage. Should continue scanning after closing "```" despite cache +. +```aaa``bbb``ccc```ddd``eee`` +. +

aaa``bbb``cccdddeee

+. + + +Coverage. Entities. +. +*&* + +* * + +*&* +. +

&

+

+

&

+. + + +Coverage. Escape. +. +*\a* +. +

\a

+. + + +Coverage. parseLinkDestination +. +[foo](< +bar>) + +[foo]([foo](< +bar>)

+

[foo](<bar)

+. + + +Coverage. parseLinkTitle +. +[foo](bar "ba) + +[foo](bar "ba\ +z") +. +

[foo](bar "ba)

+

foo

+. + + +Coverage. Image +. +![test]( x ) +. +

test

+. +. +![test][foo] + +[bar]: 123 +. +

![test][foo]

+. +. +![test][[[ + +[bar]: 123 +. +

![test][[[

+. +. +![test]( +. +

![test](

+. + + +Coverage. Link +. +[test]( +. +

[test](

+. + + +Coverage. Reference +. +[ +test\ +]: 123 +foo +bar +. +

foo +bar

+. +. +[ +test +] +. +

[ +test +]

+. +. +> [foo]: bar +[foo] +. +
+

foo

+. + +Coverage. Tabs in blockquotes. +. +> test + + > test + + > test + +> --- +> test + + > --- + > test + + > --- + > test + +> test + + > test + + > test + +> --- +> test + + > --- + > test + + > --- + > test +. +
+
  test
+
+
+
+
 test
+
+
+
+
test
+
+
+
+
+
  test
+
+
+
+
+
 test
+
+
+
+
+
test
+
+
+
+
  	test
+
+
+
+
 	test
+
+
+
+
	test
+
+
+
+
+
  	test
+
+
+
+
+
 	test
+
+
+
+
+
	test
+
+
+. + +Coverage. Tabs in lists. +. +1. foo + + bar +. +
    +
  1. +

    foo

    +
     bar
    +
    +
  2. +
+. + +Coverage. Various tags not interrupting blockquotes because of indentation: +. +> foo + - - - - + +> foo + # not a heading +. +
+

foo +- - - -

+
+
+

foo +# not a heading

+
+. + +Coverage, entities with code > 10FFFF. Made this way for compatibility with commonmark.js. +. +� + +� +. +

+

&#x1100000;

+. + +Issue #696. Blockquotes should remember their level. +. +>>> foo +bar +>>> baz +. +
+
+
+

foo +bar +baz

+
+
+
+. + +Issue #696. Blockquotes should stop when outdented from a list. +. +1. >>> foo + bar +baz + >>> foo + >>> bar + >>> baz +. +
    +
  1. +
    +
    +
    +

    foo +bar +baz +foo

    +
    +
    +
    +
  2. +
+
+
+
+

bar +baz

+
+
+
+. + +Newline in image description +. +There is a newline in this image ![here +it is](https://github.com/executablebooks/) +. +

There is a newline in this image here
+it is

+. + +Issue #772. Header rule should not interfere with html tags. +. + + +
+==
+
+. + +
+==
+
+. + +Issue #205. Space in link destination generates IndexError +. +[Contact](http:// mail.com) + +[Contact](mailto: mail@mail.com) +. +

[Contact](http:// mail.com)

+

[Contact](mailto: mail@mail.com)

+. + +Issue #204. Combination of blockquotes, list and newlines causes an IndexError +. +> QUOTE ++ UNORDERED LIST ITEM + > INDENTED QUOTE + + + +. +
+

QUOTE

+
+
    +
  • UNORDERED LIST ITEM +
    +

    INDENTED QUOTE

    +
    +
  • +
+. -- cgit v1.2.3