aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2018-05-19 11:27:14 +0200
committerlain <lain@soykaf.club>2018-05-19 11:27:14 +0200
commitdf95118c819ae15f0de43519f2f9f9753ac60ec2 (patch)
tree7fbc5bb83b365bcfea57a9fdd258f0bf6ca82b84 /lib
parent125d934bc6d8121f600e7fde9aae0a767f6aa66e (diff)
downloadpleroma-df95118c819ae15f0de43519f2f9f9753ac60ec2.tar.gz
Fix linking problem.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/formatter.ex1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex
index 456416fbd..395a0ac55 100644
--- a/lib/pleroma/formatter.ex
+++ b/lib/pleroma/formatter.ex
@@ -160,6 +160,7 @@ defmodule Pleroma.Formatter do
links =
Regex.scan(@link_regex, text)
|> Enum.map(fn [url] -> {Ecto.UUID.generate(), url} end)
+ |> Enum.sort_by(fn ({_, url}) -> -String.length(url) end)
uuid_text =
links