|
@ -1,5 +1,4 @@ |
|
|
Regression tests for link backtracking optimizations: |
|
|
Regression tests for link backtracking optimizations: |
|
|
|
|
|
|
|
|
. |
|
|
. |
|
|
[[some unrelated text [link] |
|
|
[[some unrelated text [link] |
|
|
|
|
|
|
|
@ -10,7 +9,6 @@ Regression tests for link backtracking optimizations: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is not a valid emphasis, because \n considered a whitespace: |
|
|
This is not a valid emphasis, because \n considered a whitespace: |
|
|
|
|
|
|
|
|
. |
|
|
. |
|
|
**test |
|
|
**test |
|
|
** |
|
|
** |
|
@ -33,7 +31,6 @@ test |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Link label has priority over emphasis (not covered by commonmark tests): |
|
|
Link label has priority over emphasis (not covered by commonmark tests): |
|
|
|
|
|
|
|
|
. |
|
|
. |
|
|
[**link]()** |
|
|
[**link]()** |
|
|
|
|
|
|
|
@ -45,7 +42,6 @@ Link label has priority over emphasis (not covered by commonmark tests): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Issue #55: |
|
|
Issue #55: |
|
|
|
|
|
|
|
|
. |
|
|
. |
|
|
![test] |
|
|
![test] |
|
|
|
|
|
|
|
@ -57,7 +53,6 @@ Issue #55: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Should unescape only needed things in link destinations/titles: |
|
|
Should unescape only needed things in link destinations/titles: |
|
|
|
|
|
|
|
|
. |
|
|
. |
|
|
[test](<\f\o\o\>\\>) |
|
|
[test](<\f\o\o\>\\>) |
|
|
. |
|
|
. |
|
@ -72,7 +67,6 @@ Should unescape only needed things in link destinations/titles: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Not a closing tag |
|
|
Not a closing tag |
|
|
|
|
|
|
|
|
. |
|
|
. |
|
|
</ 123> |
|
|
</ 123> |
|
|
. |
|
|
. |
|
@ -81,7 +75,6 @@ Not a closing tag |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Not a list item |
|
|
Not a list item |
|
|
|
|
|
|
|
|
. |
|
|
. |
|
|
1.list |
|
|
1.list |
|
|
. |
|
|
. |
|
@ -89,8 +82,31 @@ Not a list item |
|
|
. |
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Coverage. Direcctive can terminate paragraph. |
|
|
Normalize link destination, but not 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/α%CE%B2γ%CE%B4</a></p> |
|
|
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Autolinks do not allow escaping: |
|
|
|
|
|
. |
|
|
|
|
|
<http://example.com/\[\> |
|
|
|
|
|
. |
|
|
|
|
|
<p><a href="http://example.com/%5C%5B%5C">http://example.com/\[\</a></p> |
|
|
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Should not throw exception on mailformed URI |
|
|
|
|
|
. |
|
|
|
|
|
[foo](<%test>) |
|
|
|
|
|
. |
|
|
|
|
|
<p><a href="%25test">foo</a></p> |
|
|
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Coverage. Directive can terminate paragraph. |
|
|
. |
|
|
. |
|
|
a |
|
|
a |
|
|
<?php |
|
|
<?php |
|
@ -99,27 +115,40 @@ a |
|
|
<?php |
|
|
<?php |
|
|
. |
|
|
. |
|
|
|
|
|
|
|
|
Normalize link destination, but not text inside it: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Coverage. Nested email autolink (silent mode) |
|
|
. |
|
|
. |
|
|
<http://example.com/α%CE%B2γ%CE%B4> |
|
|
*<foo@bar.com>* |
|
|
. |
|
|
. |
|
|
<p><a href="http://example.com/%CE%B1%CE%B2%CE%B3%CE%B4">http://example.com/α%CE%B2γ%CE%B4</a></p> |
|
|
<p><em><a href="mailto:foo@bar.com">foo@bar.com</a></em></p> |
|
|
. |
|
|
. |
|
|
|
|
|
|
|
|
Autolinks do not allow escaping: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Coverage. Unpaired nested backtick (silent mode) |
|
|
. |
|
|
. |
|
|
<http://example.com/\[\> |
|
|
*`foo* |
|
|
. |
|
|
. |
|
|
<p><a href="http://example.com/%5C%5B%5C">http://example.com/\[\</a></p> |
|
|
<p><em>`foo</em></p> |
|
|
. |
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Should not throw exception on mailformed URI |
|
|
Coverage. Entities. |
|
|
|
|
|
. |
|
|
|
|
|
*&* |
|
|
|
|
|
|
|
|
|
|
|
* * |
|
|
|
|
|
|
|
|
|
|
|
*&* |
|
|
. |
|
|
. |
|
|
[foo](<%test>) |
|
|
<p><em>&</em></p> |
|
|
|
|
|
<p><em> </em></p> |
|
|
|
|
|
<p><em>&</em></p> |
|
|
. |
|
|
. |
|
|
<p><a href="%25test">foo</a></p> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Coverage. Escape. |
|
|
|
|
|
. |
|
|
|
|
|
*\a* |
|
|
|
|
|
. |
|
|
|
|
|
<p><em>\a</em></p> |
|
|
. |
|
|
. |
|
|