Skip to content

Commit

Permalink
馃И TESTS: Add URL normalisation xfail (#170)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
  • Loading branch information
hukkin and chrisjsewell committed Dec 1, 2021
1 parent facd548 commit 0195be3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions tests/test_port/fixtures/normalize.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,11 @@ Don't encode domains in unknown schemas:
.
<p><a href="skype:%CE%B3%CE%B3%CE%B3"></a></p>
.


Square brackets are allowed
.
[foo](https://bar]baz.org)
.
<p><a href="https://bar%5Dbaz.org">foo</a></p>
.
5 changes: 4 additions & 1 deletion tests/test_port/test_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ def test_commonmark_extras(line, title, input, expected):
read_fixture_file(FIXTURE_PATH.joinpath("normalize.md")),
)
def test_normalize_url(line, title, input, expected):
if "Keep %25" in title:
if title in {
"Keep %25 as is because decoding it may break urls, #720",
"Square brackets are allowed",
}:
# TODO fix failing url escaping test
pytest.xfail("url normalisation")
md = MarkdownIt("commonmark")
Expand Down

0 comments on commit 0195be3

Please sign in to comment.