summaryrefslogtreecommitdiffstats
path: root/tests/test_port/fixtures/normalize.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:24:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:24:24 +0000
commit12e8343068b906f8b2afddc5569968a8a91fa5b0 (patch)
tree75cc5e05a4392ea0292251898f992a15a16b172b /tests/test_port/fixtures/normalize.md
parentInitial commit. (diff)
downloadmarkdown-it-py-12e8343068b906f8b2afddc5569968a8a91fa5b0.tar.xz
markdown-it-py-12e8343068b906f8b2afddc5569968a8a91fa5b0.zip
Adding upstream version 2.1.0.upstream/2.1.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_port/fixtures/normalize.md')
-rw-r--r--tests/test_port/fixtures/normalize.md39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/test_port/fixtures/normalize.md b/tests/test_port/fixtures/normalize.md
new file mode 100644
index 0000000..4a00508
--- /dev/null
+++ b/tests/test_port/fixtures/normalize.md
@@ -0,0 +1,39 @@
+
+Encode link destination, decode 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/αβγδ</a></p>
+.
+
+.
+[foo](http://example.com/α%CE%B2γ%CE%B4)
+.
+<p><a href="http://example.com/%CE%B1%CE%B2%CE%B3%CE%B4">foo</a></p>
+.
+
+
+Keep %25 as is because decoding it may break urls, #720
+.
+<https://www.google.com/search?q=hello%2E%252Ehello>
+.
+<p><a href="https://www.google.com/search?q=hello%2E%252Ehello">https://www.google.com/search?q=hello.%252Ehello</a></p>
+.
+
+
+Don't encode domains in unknown schemas:
+
+.
+[](skype:γγγ)
+.
+<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>
+.