"<a href=\"https://en.wikipedia.org/wiki/Duff's_device\">https://en.wikipedia.org/wiki/Duff's_device</a>"
assert Formatter.add_links({[], text}) |> Formatter.finalize() == expected
+
+ text = "https://pleroma.com https://pleroma.com/sucks"
+
+ expected =
+ "<a href=\"https://pleroma.com\">https://pleroma.com</a> <a href=\"https://pleroma.com/sucks\">https://pleroma.com/sucks</a>"
+
+ assert Formatter.add_links({[], text}) |> Formatter.finalize() == expected
end
end
Enum.each(subs, fn {uuid, _} -> assert String.contains?(text, uuid) end)
expected_text =
- "<span><a href='#{gsimg.ap_id}'>@<span>gsimg</span></a></span> According to <span><a href='#{
+ "<span><a class='mention' href='#{gsimg.ap_id}'>@<span>gsimg</span></a></span> According to <span><a class='mention' href='#{
"https://archeme/@archaeme"
- }'>@<span>archaeme</span></a></span>, that is @daggsy. Also hello <span><a href='#{
+ }'>@<span>archaeme</span></a></span>, that is @daggsy. Also hello <span><a class='mention' href='#{
archaeme_remote.ap_id
}'>@<span>archaeme</span></a></span>"