Commit 145546e5 authored by kaniini's avatar kaniini

common api: format hashtags in the same way as we format mentions

parent e0c350db
...@@ -109,7 +109,7 @@ def add_tag_links(text, tags) do ...@@ -109,7 +109,7 @@ def add_tag_links(text, tags) do
|> Enum.sort_by(fn {tag, _} -> -String.length(tag) end) |> Enum.sort_by(fn {tag, _} -> -String.length(tag) end)
Enum.reduce(tags, text, fn {full, tag}, text -> Enum.reduce(tags, text, fn {full, tag}, text ->
url = "#<a href='#{Pleroma.Web.base_url()}/tag/#{tag}' rel='tag'>#{tag}</a>" url = "<a href='#{Pleroma.Web.base_url}/tag/#{tag}' rel='tag'>##{tag}</a>"
String.replace(text, full, url) String.replace(text, full, url)
end) end)
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment