projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'parallel588/pleroma-support/compile_warnings' into 'develop'
[akkoma]
/
lib
/
pleroma
/
formatter.ex
diff --git
a/lib/pleroma/formatter.ex
b/lib/pleroma/formatter.ex
index 26bb17377094340d69a0280086cc146ee4e85f83..5b03e9aeb7b469903d12284d5e096fc3df722b8e 100644
(file)
--- a/
lib/pleroma/formatter.ex
+++ b/
lib/pleroma/formatter.ex
@@
-114,10
+114,10
@@
defmodule Pleroma.Formatter do
subs =
subs ++
subs =
subs ++
- Enum.map(mentions, fn {match, %User{ap_id: ap_id, info: info}, uuid} ->
+ Enum.map(mentions, fn {match, %User{
id: id,
ap_id: ap_id, info: info}, uuid} ->
ap_id =
ap_id =
- if is_binary(info
["source_data"]
["url"]) do
- info
["source_data"]
["url"]
+ if is_binary(info
.source_data
["url"]) do
+ info
.source_data
["url"]
else
ap_id
end
else
ap_id
end
@@
-125,7
+125,7
@@
defmodule Pleroma.Formatter do
short_match = String.split(match, "@") |> tl() |> hd()
{uuid,
short_match = String.split(match, "@") |> tl() |> hd()
{uuid,
- "<span><a class='mention' href='#{ap_id}'>@<span>#{short_match}</span></a></span>"}
+ "<span><a
data-user='#{id}'
class='mention' href='#{ap_id}'>@<span>#{short_match}</span></a></span>"}
end)
{subs, uuid_text}
end)
{subs, uuid_text}
@@
-147,7
+147,11
@@
defmodule Pleroma.Formatter do
subs =
subs ++
Enum.map(tags, fn {tag_text, tag, uuid} ->
subs =
subs ++
Enum.map(tags, fn {tag_text, tag, uuid} ->
- url = "<a href='#{Pleroma.Web.base_url()}/tag/#{tag}' rel='tag'>#{tag_text}</a>"
+ url =
+ "<a data-tag='#{tag}' href='#{Pleroma.Web.base_url()}/tag/#{tag}' rel='tag'>#{
+ tag_text
+ }</a>"
+
{uuid, url}
end)
{uuid, url}
end)