Skip to content

Commit ecb8727

Browse files
authored
🐛 FIX: Backslash escapes should not work inside autolinks (#97)
Fixes CommonMark specificaion example 599
1 parent b232bf1 commit ecb8727

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

markdown_it/common/normalize_url.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def normalizeLink(url):
8181
(
8282
scheme,
8383
unescape_normalize_uri(netloc),
84-
unescape_normalize_uri(path),
84+
normalize_uri(path),
8585
unescape_normalize_uri(params),
8686
normalize_uri(query),
8787
unescape_normalize_uri(fragment),

tests/test_cmark_spec/test_spec.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ def test_file(file_regression):
1919

2020
@pytest.mark.parametrize("entry", json.loads(TESTS_INPUT.read_text()))
2121
def test_spec(entry):
22-
if entry["example"] == 599:
23-
# TODO fix Backslash-escapes do not work inside autolinks
24-
pytest.skip("autolinks backslash escape")
2522
md = MarkdownIt("commonmark")
2623
output = md.render(entry["markdown"])
2724
expected = entry["html"]

0 commit comments

Comments
 (0)