diff options
author | href <href@random.sh> | 2017-12-11 02:45:28 +0100 |
---|---|---|
committer | href <href@random.sh> | 2017-12-11 02:45:28 +0100 |
commit | 9093b2cf4923274572729f46b688ab12f5a0bfdc (patch) | |
tree | 1ef3a7bfacc825fdc5ea47da6ceafd7b450aec91 /test/formatter_test.exs | |
parent | d1806ec07f44b617769bc862048df30b8a3336da (diff) | |
parent | d5a13c10ac6a9a5f8dbb1932ffc85260f079a2dc (diff) | |
download | pleroma-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.exs | 10 |
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 |