diff --git a/corpus/failing.txt b/corpus/failing.txt new file mode 100644 index 0000000000..f895239f1a --- /dev/null +++ b/corpus/failing.txt @@ -0,0 +1,374 @@ +================================================================================ +Example 177 - https://github.github.com/gfm/#example-177 +================================================================================ +[ +foo +]: /url +bar + +-------------------------------------------------------------------------------- + +(document + (link_reference_definition + (link_label) + (link_destination)) + (paragraph)) + +================================================================================ +Example 354 - https://github.github.com/gfm/#example-354 +================================================================================ +` + +-------------------------------------------------------------------------------- + +(document + (paragraph + (html_tag))) + +================================================================================ +Example 355 - https://github.github.com/gfm/#example-355 +================================================================================ +`` + +-------------------------------------------------------------------------------- + +(document + (paragraph + (code_span))) + +================================================================================ +Example 363 - https://github.github.com/gfm/#example-363 +================================================================================ +*  a * + +-------------------------------------------------------------------------------- + +(document + (paragraph)) + +================================================================================ +Example 376 - https://github.github.com/gfm/#example-376 +================================================================================ +*foo bar +* + +-------------------------------------------------------------------------------- + +(document + (paragraph)) + +================================================================================ +Example 380 - https://github.github.com/gfm/#example-380 +================================================================================ +_foo bar _ + +-------------------------------------------------------------------------------- + +(document + (paragraph)) + +================================================================================ +Example 388 - https://github.github.com/gfm/#example-388 +================================================================================ +** foo bar** + +-------------------------------------------------------------------------------- + +(document + (paragraph)) + +================================================================================ +Example 389 - https://github.github.com/gfm/#example-389 +================================================================================ +a**"foo"** + +-------------------------------------------------------------------------------- + +(document + (paragraph)) + +================================================================================ +Example 394 - https://github.github.com/gfm/#example-394 +================================================================================ +a__"foo"__ + +-------------------------------------------------------------------------------- + +(document + (paragraph)) + +================================================================================ +Example 395 - https://github.github.com/gfm/#example-395 +================================================================================ +foo__bar__ + +-------------------------------------------------------------------------------- + +(document + (paragraph)) + +================================================================================ +Example 397 - https://github.github.com/gfm/#example-397 +================================================================================ +пристаням__стремятся__ + +-------------------------------------------------------------------------------- + +(document + (paragraph)) + +================================================================================ +Example 400 - https://github.github.com/gfm/#example-400 +================================================================================ +**foo bar ** + +-------------------------------------------------------------------------------- + +(document + (paragraph)) + +================================================================================ +Example 401 - https://github.github.com/gfm/#example-401 +================================================================================ +**(**foo) + +-------------------------------------------------------------------------------- + +(document + (paragraph)) + +================================================================================ +Example 403 - https://github.github.com/gfm/#example-403 +================================================================================ +**Gomphocarpus (*Gomphocarpus physocarpus*, syn. +*Asclepias physocarpa*)** + +-------------------------------------------------------------------------------- + +(document + (paragraph + (strong_emphasis + (emphasis_delimiter) + (emphasis_delimiter) + (emphasis + (emphasis_delimiter) + (emphasis_delimiter)) + (emphasis + (emphasis_delimiter) + (emphasis_delimiter)) + (emphasis_delimiter) + (emphasis_delimiter)))) + +================================================================================ +Example 406 - https://github.github.com/gfm/#example-406 +================================================================================ +__foo bar __ + +-------------------------------------------------------------------------------- + +(document + (paragraph)) + +================================================================================ +Example 411 - https://github.github.com/gfm/#example-411 +================================================================================ +__foo__bar__baz__ + +-------------------------------------------------------------------------------- + +(document + (paragraph + (strong_emphasis))) + +================================================================================ +Example 420 - https://github.github.com/gfm/#example-420 +================================================================================ +*foo**bar**baz* + +-------------------------------------------------------------------------------- + +(document + (paragraph + (emphasis + (strong_emphasis)))) + +================================================================================ +Example 421 - https://github.github.com/gfm/#example-421 +================================================================================ +*foo**bar* + +-------------------------------------------------------------------------------- + +(document + (paragraph + (emphasis))) + +================================================================================ +Example 424 - https://github.github.com/gfm/#example-424 +================================================================================ +*foo**bar*** + +-------------------------------------------------------------------------------- + +(document + (paragraph + (emphasis + (strong_emphasis)))) + +================================================================================ +Example 438 - https://github.github.com/gfm/#example-438 +================================================================================ +**foo*bar*baz** + +-------------------------------------------------------------------------------- + +(document + (paragraph + (strong_emphasis + (emphasis)))) + +================================================================================ +Example 470 - https://github.github.com/gfm/#example-470 +================================================================================ +*_foo_* + +-------------------------------------------------------------------------------- + +(document + (paragraph + (emphasis + (emphasis)))) + +================================================================================ +Example 478 - https://github.github.com/gfm/#example-478 +================================================================================ +*foo _bar* baz_ + +-------------------------------------------------------------------------------- + +(document + (emphasis)) + +================================================================================ +Example 487 - https://github.github.com/gfm/#example-487 +================================================================================ +*a `*`* + +-------------------------------------------------------------------------------- + +(document + (paragraph + (emphasis + (code_span)))) + +================================================================================ +Example 488 - https://github.github.com/gfm/#example-488 +================================================================================ +_a `_`_ + +-------------------------------------------------------------------------------- + +(document + (paragraph + (emphasis + (code_span)))) + +================================================================================ +Example 524 - https://github.github.com/gfm/#example-524 +================================================================================ +[link *foo **bar** `#`*](/uri) + +-------------------------------------------------------------------------------- + +(document + (inline_link + (link_text + (emphasis + (strong_emphasis) + (code_span))) + (link_destination))) + +================================================================================ +Example 538 - https://github.github.com/gfm/#example-538 +================================================================================ +[link *foo **bar** `#`*][ref] + +[ref]: /uri + +-------------------------------------------------------------------------------- + +(document + (paragraph + (full_reference_link + (link_text + (emphasis + (strong_emphasis) + (code_span))) + (link_label))) + (link_reference_definition + (link_label) + (link_destination))) + +================================================================================ +Example 560 - https://github.github.com/gfm/#example-560 +================================================================================ +[ + ] + +[ + ]: /uri + +-------------------------------------------------------------------------------- + +(document + (paragraph) + (paragraph)) + +================================================================================ +Example 588 - https://github.github.com/gfm/#example-588 +================================================================================ +![foo]() + +-------------------------------------------------------------------------------- + +(document + (paragraph + (image + (image_description) + (link_destination)))) + +================================================================================ +Example 635 - https://github.github.com/gfm/#example-635 +================================================================================ + + +-------------------------------------------------------------------------------- + +(document + (paragraph + (html_tag))) + +================================================================================ +Example 645 - https://github.github.com/gfm/#example-645 +================================================================================ +foo + +-------------------------------------------------------------------------------- + +(document + (paragraph)) + +================================================================================ +Example 646 - https://github.github.com/gfm/#example-646 +================================================================================ +foo foo --> + +foo + +-------------------------------------------------------------------------------- + +(document + (paragraph) + (paragraph)) + diff --git a/corpus/spec.txt b/corpus/spec.txt index b5c5dd613f..306b6da889 100644 --- a/corpus/spec.txt +++ b/corpus/spec.txt @@ -2667,22 +2667,6 @@ Example 176 - https://github.github.com/gfm/#example-176 (link_label) (link_destination))) -================================================================================ -Example 177 - https://github.github.com/gfm/#example-177 -================================================================================ -[ -foo -]: /url -bar - --------------------------------------------------------------------------------- - -(document - (link_reference_definition - (link_label) - (link_destination)) - (paragraph)) - ================================================================================ Example 178 - https://github.github.com/gfm/#example-178 ================================================================================ @@ -5581,28 +5565,6 @@ Example 353 - https://github.github.com/gfm/#example-353 (code_span_delimiter) (code_span_delimiter)))) -================================================================================ -Example 354 - https://github.github.com/gfm/#example-354 -================================================================================ -` - --------------------------------------------------------------------------------- - -(document - (paragraph - (html_tag))) - -================================================================================ -Example 355 - https://github.github.com/gfm/#example-355 -================================================================================ -`` - --------------------------------------------------------------------------------- - -(document - (paragraph - (code_span))) - ================================================================================ Example 356 - https://github.github.com/gfm/#example-356 ================================================================================ @@ -5677,16 +5639,6 @@ a*"foo"* -------------------------------------------------------------------------------- -(document - (paragraph)) - -================================================================================ -Example 363 - https://github.github.com/gfm/#example-363 -================================================================================ -*  a * - --------------------------------------------------------------------------------- - (document (paragraph)) @@ -5819,17 +5771,6 @@ Example 375 - https://github.github.com/gfm/#example-375 -------------------------------------------------------------------------------- -(document - (paragraph)) - -================================================================================ -Example 376 - https://github.github.com/gfm/#example-376 -================================================================================ -*foo bar -* - --------------------------------------------------------------------------------- - (document (paragraph)) @@ -5872,16 +5813,6 @@ Example 379 - https://github.github.com/gfm/#example-379 (emphasis_delimiter) (emphasis_delimiter)))) -================================================================================ -Example 380 - https://github.github.com/gfm/#example-380 -================================================================================ -_foo bar _ - --------------------------------------------------------------------------------- - -(document - (paragraph)) - ================================================================================ Example 381 - https://github.github.com/gfm/#example-381 ================================================================================ @@ -5969,26 +5900,6 @@ Example 387 - https://github.github.com/gfm/#example-387 (emphasis_delimiter) (emphasis_delimiter)))) -================================================================================ -Example 388 - https://github.github.com/gfm/#example-388 -================================================================================ -** foo bar** - --------------------------------------------------------------------------------- - -(document - (paragraph)) - -================================================================================ -Example 389 - https://github.github.com/gfm/#example-389 -================================================================================ -a**"foo"** - --------------------------------------------------------------------------------- - -(document - (paragraph)) - ================================================================================ Example 390 - https://github.github.com/gfm/#example-390 ================================================================================ @@ -6037,26 +5948,6 @@ foo bar__ -------------------------------------------------------------------------------- -(document - (paragraph)) - -================================================================================ -Example 394 - https://github.github.com/gfm/#example-394 -================================================================================ -a__"foo"__ - --------------------------------------------------------------------------------- - -(document - (paragraph)) - -================================================================================ -Example 395 - https://github.github.com/gfm/#example-395 -================================================================================ -foo__bar__ - --------------------------------------------------------------------------------- - (document (paragraph)) @@ -6067,16 +5958,6 @@ Example 396 - https://github.github.com/gfm/#example-396 -------------------------------------------------------------------------------- -(document - (paragraph)) - -================================================================================ -Example 397 - https://github.github.com/gfm/#example-397 -================================================================================ -пристаням__стремятся__ - --------------------------------------------------------------------------------- - (document (paragraph)) @@ -6115,26 +5996,6 @@ foo-__(bar)__ (emphasis_delimiter) (emphasis_delimiter)))) -================================================================================ -Example 400 - https://github.github.com/gfm/#example-400 -================================================================================ -**foo bar ** - --------------------------------------------------------------------------------- - -(document - (paragraph)) - -================================================================================ -Example 401 - https://github.github.com/gfm/#example-401 -================================================================================ -**(**foo) - --------------------------------------------------------------------------------- - -(document - (paragraph)) - ================================================================================ Example 402 - https://github.github.com/gfm/#example-402 ================================================================================ @@ -6153,28 +6014,6 @@ Example 402 - https://github.github.com/gfm/#example-402 (emphasis_delimiter)) (emphasis_delimiter)))) -================================================================================ -Example 403 - https://github.github.com/gfm/#example-403 -================================================================================ -**Gomphocarpus (*Gomphocarpus physocarpus*, syn. -*Asclepias physocarpa*)** - --------------------------------------------------------------------------------- - -(document - (paragraph - (strong_emphasis - (emphasis_delimiter) - (emphasis_delimiter) - (emphasis - (emphasis_delimiter) - (emphasis_delimiter)) - (emphasis - (emphasis_delimiter) - (emphasis_delimiter)) - (emphasis_delimiter) - (emphasis_delimiter)))) - ================================================================================ Example 404 - https://github.github.com/gfm/#example-404 ================================================================================ @@ -6208,16 +6047,6 @@ Example 405 - https://github.github.com/gfm/#example-405 (emphasis_delimiter) (emphasis_delimiter)))) -================================================================================ -Example 406 - https://github.github.com/gfm/#example-406 -================================================================================ -__foo bar __ - --------------------------------------------------------------------------------- - -(document - (paragraph)) - ================================================================================ Example 407 - https://github.github.com/gfm/#example-407 ================================================================================ @@ -6266,17 +6095,6 @@ __пристаням__стремятся (document (paragraph)) -================================================================================ -Example 411 - https://github.github.com/gfm/#example-411 -================================================================================ -__foo__bar__baz__ - --------------------------------------------------------------------------------- - -(document - (paragraph - (strong_emphasis))) - ================================================================================ Example 412 - https://github.github.com/gfm/#example-412 ================================================================================ @@ -6406,29 +6224,6 @@ Example 419 - https://github.github.com/gfm/#example-419 (emphasis_delimiter)) (emphasis_delimiter)))) -================================================================================ -Example 420 - https://github.github.com/gfm/#example-420 -================================================================================ -*foo**bar**baz* - --------------------------------------------------------------------------------- - -(document - (paragraph - (emphasis - (strong_emphasis)))) - -================================================================================ -Example 421 - https://github.github.com/gfm/#example-421 -================================================================================ -*foo**bar* - --------------------------------------------------------------------------------- - -(document - (paragraph - (emphasis))) - ================================================================================ Example 422 - https://github.github.com/gfm/#example-422 ================================================================================ @@ -6465,18 +6260,6 @@ Example 423 - https://github.github.com/gfm/#example-423 (emphasis_delimiter)) (emphasis_delimiter)))) -================================================================================ -Example 424 - https://github.github.com/gfm/#example-424 -================================================================================ -*foo**bar*** - --------------------------------------------------------------------------------- - -(document - (paragraph - (emphasis - (strong_emphasis)))) - ================================================================================ Example 425 - https://github.github.com/gfm/#example-425 ================================================================================ @@ -6710,18 +6493,6 @@ Example 437 - https://github.github.com/gfm/#example-437 (emphasis_delimiter) (emphasis_delimiter)))) -================================================================================ -Example 438 - https://github.github.com/gfm/#example-438 -================================================================================ -**foo*bar*baz** - --------------------------------------------------------------------------------- - -(document - (paragraph - (strong_emphasis - (emphasis)))) - ================================================================================ Example 439 - https://github.github.com/gfm/#example-439 ================================================================================ @@ -7158,18 +6929,6 @@ Example 469 - https://github.github.com/gfm/#example-469 (emphasis_delimiter) (emphasis_delimiter)))) -================================================================================ -Example 470 - https://github.github.com/gfm/#example-470 -================================================================================ -*_foo_* - --------------------------------------------------------------------------------- - -(document - (paragraph - (emphasis - (emphasis)))) - ================================================================================ Example 471 - https://github.github.com/gfm/#example-471 ================================================================================ @@ -7307,16 +7066,6 @@ _____foo_____ (emphasis_delimiter)) (emphasis_delimiter)))) -================================================================================ -Example 478 - https://github.github.com/gfm/#example-478 -================================================================================ -*foo _bar* baz_ - --------------------------------------------------------------------------------- - -(document - (emphasis)) - ================================================================================ Example 479 - https://github.github.com/gfm/#example-479 ================================================================================ @@ -7422,30 +7171,6 @@ __ (paragraph (html_tag))) -================================================================================ -Example 487 - https://github.github.com/gfm/#example-487 -================================================================================ -*a `*`* - --------------------------------------------------------------------------------- - -(document - (paragraph - (emphasis - (code_span)))) - -================================================================================ -Example 488 - https://github.github.com/gfm/#example-488 -================================================================================ -_a `_`_ - --------------------------------------------------------------------------------- - -(document - (paragraph - (emphasis - (code_span)))) - ================================================================================ Example 489 - https://github.github.com/gfm/#example-489 ================================================================================ @@ -7910,21 +7635,6 @@ Example 523 - https://github.github.com/gfm/#example-523 (backslash_escape)) (link_destination)))) -================================================================================ -Example 524 - https://github.github.com/gfm/#example-524 -================================================================================ -[link *foo **bar** `#`*](/uri) - --------------------------------------------------------------------------------- - -(document - (inline_link - (link_text - (emphasis - (strong_emphasis) - (code_span))) - (link_destination))) - ================================================================================ Example 525 - https://github.github.com/gfm/#example-525 ================================================================================ @@ -8116,27 +7826,6 @@ Example 537 - https://github.github.com/gfm/#example-537 (link_label) (link_destination))) -================================================================================ -Example 538 - https://github.github.com/gfm/#example-538 -================================================================================ -[link *foo **bar** `#`*][ref] - -[ref]: /uri - --------------------------------------------------------------------------------- - -(document - (paragraph - (full_reference_link - (link_text - (emphasis - (strong_emphasis) - (code_span))) - (link_label))) - (link_reference_definition - (link_label) - (link_destination))) - ================================================================================ Example 539 - https://github.github.com/gfm/#example-539 ================================================================================ @@ -8524,21 +8213,6 @@ Example 559 - https://github.github.com/gfm/#example-559 -------------------------------------------------------------------------------- -(document - (paragraph) - (paragraph)) - -================================================================================ -Example 560 - https://github.github.com/gfm/#example-560 -================================================================================ -[ - ] - -[ - ]: /uri - --------------------------------------------------------------------------------- - (document (paragraph) (paragraph)) @@ -9043,19 +8717,6 @@ My ![foo bar](/path/to/train.jpg "title" ) (link_destination) (link_title)))) -================================================================================ -Example 588 - https://github.github.com/gfm/#example-588 -================================================================================ -![foo]() - --------------------------------------------------------------------------------- - -(document - (paragraph - (image - (image_description) - (link_destination)))) - ================================================================================ Example 589 - https://github.github.com/gfm/#example-589 ================================================================================ @@ -9532,18 +9193,6 @@ data="foo" > (html_tag) (html_tag))) -================================================================================ -Example 635 - https://github.github.com/gfm/#example-635 -================================================================================ - - --------------------------------------------------------------------------------- - -(document - (paragraph - (html_tag))) - ================================================================================ Example 636 - https://github.github.com/gfm/#example-636 ================================================================================ @@ -9642,29 +9291,6 @@ comment - with hyphen --> (paragraph (html_tag))) -================================================================================ -Example 645 - https://github.github.com/gfm/#example-645 -================================================================================ -foo - --------------------------------------------------------------------------------- - -(document - (paragraph)) - -================================================================================ -Example 646 - https://github.github.com/gfm/#example-646 -================================================================================ -foo foo --> - -foo - --------------------------------------------------------------------------------- - -(document - (paragraph) - (paragraph)) - ================================================================================ Example 647 - https://github.github.com/gfm/#example-647 ================================================================================