@emoji
end
- @link_regex ~r/https?:\/\/[\w\.\/?=\-#\+%&@~\(\)]+[\w\/]/u
+ @link_regex ~r/https?:\/\/[\w\.\/?=\-#\+%&@~\(\):]+[\w\/]/u
def html_escape(text) do
Regex.split(@link_regex, text, include_captures: true)
assert Formatter.add_links({[], text}) |> Formatter.finalize() == expected
+ text = "https://mastodon.social:4000/@lambadalambda"
+
+ expected =
+ "<a href='https://mastodon.social:4000/@lambadalambda'>https://mastodon.social:4000/@lambadalambda</a>"
+
+ assert Formatter.add_links({[], text}) |> Formatter.finalize() == expected
+
text = "@lambadalambda"
expected = "@lambadalambda"