[#491] Made user bio preserve full nicknames (nick@host).

This commit is contained in:
Ivan Tashkinov 2019-01-17 18:03:49 +03:00
commit 2bfae25a1f
3 changed files with 6 additions and 7 deletions

View file

@ -142,12 +142,11 @@ defmodule Pleroma.Formatter do
ap_id
end
short_match = String.split(match, "@") |> tl() |> hd()
full_match = String.trim_leading(match, "@")
{uuid,
"<span class='h-card'><a data-user='#{id}' class='u-url mention' href='#{ap_id}'>@<span>#{
short_match
}</span></a></span>"}
"<span class='h-card'><a data-user='#{id}' class='u-url mention' href='#{ap_id}'>" <>
"@<span>#{full_match}</span></a></span>"}
end)
{subs, uuid_text}