formatter: use class='mention' on links to user profiles

helps mastodon frontend and apps have better context:
https://mastodon.social/users/Gargron/statuses/100101267352899379
This commit is contained in:
William Pitcock 2018-05-27 12:53:14 +00:00
parent a9e36e5a64
commit a8df7fc690

View file

@ -200,7 +200,7 @@ defmodule Pleroma.Formatter do
ap_id = info["source_data"]["url"] || ap_id ap_id = info["source_data"]["url"] || ap_id
short_match = String.split(match, "@") |> tl() |> hd() short_match = String.split(match, "@") |> tl() |> hd()
{uuid, "<span><a href='#{ap_id}'>@<span>#{short_match}</span></a></span>"} {uuid, "<span><a class='mention' href='#{ap_id}'>@<span>#{short_match}</span></a></span>"}
end) end)
{subs, uuid_text} {subs, uuid_text}