Add a bunch of useless HTML to mentions.

This commit is contained in:
eal 2017-12-11 18:14:33 +02:00
parent afd0ea37f3
commit b00e230760

View file

@ -91,7 +91,7 @@ def add_user_links(text, mentions) do
Enum.reduce(mentions, step_one, fn ({match, %User{ap_id: ap_id}, uuid}, text) -> Enum.reduce(mentions, step_one, fn ({match, %User{ap_id: ap_id}, uuid}, text) ->
short_match = String.split(match, "@") |> tl() |> hd() short_match = String.split(match, "@") |> tl() |> hd()
String.replace(text, uuid, "<a href='#{ap_id}'>@#{short_match}</a>") String.replace(text, uuid, "<span><a href='#{ap_id}'>@<span>#{short_match}</span></a></span>")
end) end)
end end