diff --git a/test/linkify_test.exs b/test/linkify_test.exs
index 3d9bf55..9e94437 100644
--- a/test/linkify_test.exs
+++ b/test/linkify_test.exs
@@ -406,6 +406,15 @@ defmodule LinkifyTest do
assert Linkify.link(text, mention: true, mention_prefix: "/users/") == expected
end
+
+ test ".onion domain" do
+ text = "Hey @admin@vww6ybal4bd7szmgncyruucpgfkqahzddi37ktceo3ah7ngmcopnpyyd.onion"
+
+ expected =
+ "Hey @admin@vww6ybal4bd7szmgncyruucpgfkqahzddi37ktceo3ah7ngmcopnpyyd.onion"
+
+ assert Linkify.link(text, mention: true, mention_prefix: "/users/") == expected
+ end
end
describe "hashtag links" do
@@ -713,7 +722,8 @@ defmodule LinkifyTest do
text = "I looked at theonion.com; it was no longer funny."
- expected = "I looked at theonion.com; it was no longer funny."
+ expected =
+ "I looked at theonion.com; it was no longer funny."
assert Linkify.link(text) == expected
end
@@ -732,5 +742,15 @@ defmodule LinkifyTest do
assert Linkify.link(text) == expected
end
+
+ test ".onion domain" do
+ text =
+ "The riseup.net hidden service is at vww6ybal4bd7szmgncyruucpgfkqahzddi37ktceo3ah7ngmcopnpyyd.onion"
+
+ expected =
+ "The riseup.net hidden service is at vww6ybal4bd7szmgncyruucpgfkqahzddi37ktceo3ah7ngmcopnpyyd.onion"
+
+ assert Linkify.link(text) == expected
+ end
end
end