Browse Source

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

tags/v0.9.9
William Pitcock 6 years ago
parent
commit
145546e52a
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      lib/pleroma/web/common_api/utils.ex

+ 1
- 1
lib/pleroma/web/common_api/utils.ex View File

@@ -109,7 +109,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
|> Enum.sort_by(fn {tag, _} -> -String.length(tag) end)

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)
end)
end


Loading…
Cancel
Save