summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoreal <eal@waifu.club>2017-12-07 21:38:31 +0200
committereal <eal@waifu.club>2017-12-07 21:38:31 +0200
commita3e68f02330a3c38f1d3f568ad507e5111b82600 (patch)
tree157ebb2376bed8f4cb41bd2d1b92c84b2fe3f5bb /test
parentbf91e5659ffd03b15110b6f1094b30aed940e45b (diff)
downloadpleroma-a3e68f02330a3c38f1d3f568ad507e5111b82600.tar.gz
pleroma-a3e68f02330a3c38f1d3f568ad507e5111b82600.zip
Allow parentheses in links.
Diffstat (limited to 'test')
-rw-r--r--test/formatter_test.exs10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/formatter_test.exs b/test/formatter_test.exs
index f91973881..cb7695e8e 100644
--- a/test/formatter_test.exs
+++ b/test/formatter_test.exs
@@ -25,6 +25,16 @@ defmodule Pleroma.FormatterTest do
expected = "<a href='http://www.cs.vu.nl/~ast/intel/'>http://www.cs.vu.nl/~ast/intel/</a>"
assert Formatter.linkify(text) == expected
+
+ text = "https://forum.zdoom.org/viewtopic.php?f=44&t=57087"
+ expected = "<a href='https://forum.zdoom.org/viewtopic.php?f=44&t=57087'>https://forum.zdoom.org/viewtopic.php?f=44&t=57087</a>"
+
+ assert Formatter.linkify(text) == expected
+
+ text = "https://en.wikipedia.org/wiki/Sophia_(Gnosticism)#Mythos_of_the_soul"
+ expected = "<a href='https://en.wikipedia.org/wiki/Sophia_(Gnosticism)#Mythos_of_the_soul'>https://en.wikipedia.org/wiki/Sophia_(Gnosticism)#Mythos_of_the_soul</a>"
+
+ assert Formatter.linkify(text) == expected
end
end