summaryrefslogtreecommitdiffstats
path: root/tests/test_port/fixtures/punycode.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/punycode.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/punycode.md')
-rw-r--r--tests/test_port/fixtures/punycode.md77
1 files changed, 77 insertions, 0 deletions
diff --git a/tests/test_port/fixtures/punycode.md b/tests/test_port/fixtures/punycode.md
new file mode 100644
index 0000000..c726e82
--- /dev/null
+++ b/tests/test_port/fixtures/punycode.md
@@ -0,0 +1,77 @@
+Should decode punycode:
+
+.
+<http://xn--n3h.net/>
+.
+<p><a href="http://xn--n3h.net/">http://☃.net/</a></p>
+.
+
+.
+<http://☃.net/>
+.
+<p><a href="http://xn--n3h.net/">http://☃.net/</a></p>
+.
+
+Invalid punycode:
+
+.
+<http://xn--xn.com/>
+.
+<p><a href="http://xn--xn.com/">http://xn--xn.com/</a></p>
+.
+
+Invalid punycode (non-ascii):
+
+.
+<http://xn--γ.com/>
+.
+<p><a href="http://xn--xn---emd.com/">http://xn--γ.com/</a></p>
+.
+
+Two slashes should start a domain:
+
+.
+[](//☃.net/)
+.
+<p><a href="//xn--n3h.net/"></a></p>
+.
+
+Should auto-add protocol to autolinks:
+
+.
+test google.com foo
+.
+<p>test <a href="http://google.com">google.com</a> foo</p>
+.
+
+Should support IDN in autolinks:
+
+.
+test http://xn--n3h.net/ foo
+.
+<p>test <a href="http://xn--n3h.net/">http://☃.net/</a> foo</p>
+.
+
+.
+test http://☃.net/ foo
+.
+<p>test <a href="http://xn--n3h.net/">http://☃.net/</a> foo</p>
+.
+
+.
+test //xn--n3h.net/ foo
+.
+<p>test <a href="//xn--n3h.net/">//☃.net/</a> foo</p>
+.
+
+.
+test xn--n3h.net foo
+.
+<p>test <a href="http://xn--n3h.net">☃.net</a> foo</p>
+.
+
+.
+test xn--n3h@xn--n3h.net foo
+.
+<p>test <a href="mailto:xn--n3h@xn--n3h.net">xn--n3h@☃.net</a> foo</p>
+.