Skip to content

Commit 4c9ccd6

Browse files
committed
TESTS: Add URL normalisation xfail test
1 parent 1d27af1 commit 4c9ccd6

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

tests/test_port/fixtures/normalize.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,11 @@ Don't encode domains in unknown schemas:
2929
.
3030
<p><a href="skype:%CE%B3%CE%B3%CE%B3"></a></p>
3131
.
32+
33+
34+
Square brackets are allowed
35+
.
36+
[foo](https://bar]baz.org)
37+
.
38+
<p><a href="https://bar%5Dbaz.org">foo</a></p>
39+
.

tests/test_port/test_fixtures.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ def test_commonmark_extras(line, title, input, expected):
8181
read_fixture_file(FIXTURE_PATH.joinpath("normalize.md")),
8282
)
8383
def test_normalize_url(line, title, input, expected):
84-
if "Keep %25" in title:
84+
if title in {
85+
"Keep %25 as is because decoding it may break urls, #720",
86+
"Square brackets are allowed",
87+
}:
8588
# TODO fix failing url escaping test
8689
pytest.xfail("url normalisation")
8790
md = MarkdownIt("commonmark")

0 commit comments

Comments
 (0)