diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-01-17 18:03:49 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-01-17 18:03:49 +0300 |
commit | 2bfae25a1ff735499e15cb431314503f34097a6b (patch) | |
tree | 279ecb74aa6a5e58273d83105ef0b975a27249d5 /lib | |
parent | ce2efd1ee25d6e06c4bc5c0d97aad7b84c7c6874 (diff) | |
download | pleroma-2bfae25a1ff735499e15cb431314503f34097a6b.tar.gz |
[#491] Made user bio preserve full nicknames (nick@host).
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/formatter.ex | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex index 4149265a2..024c6e117 100644 --- a/lib/pleroma/formatter.ex +++ b/lib/pleroma/formatter.ex @@ -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} |