summaryrefslogtreecommitdiff
path: root/test/formatter_test.exs
diff options
context:
space:
mode:
authorhref <href@random.sh>2017-12-11 02:45:28 +0100
committerhref <href@random.sh>2017-12-11 02:45:28 +0100
commit9093b2cf4923274572729f46b688ab12f5a0bfdc (patch)
tree1ef3a7bfacc825fdc5ea47da6ceafd7b450aec91 /test/formatter_test.exs
parentd1806ec07f44b617769bc862048df30b8a3336da (diff)
parentd5a13c10ac6a9a5f8dbb1932ffc85260f079a2dc (diff)
downloadpleroma-9093b2cf4923274572729f46b688ab12f5a0bfdc.tar.gz
pleroma-9093b2cf4923274572729f46b688ab12f5a0bfdc.zip
Merge remote-tracking branch 'upstream/develop' into media-proxy
Diffstat (limited to 'test/formatter_test.exs')
-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