builder.ex: Use Enum.map_join instead of Enum.map+Enum.join

This commit is contained in:
Haelwenn (lanodan) Monnier 2022-03-07 15:04:04 +01:00
parent fa46ecf29f
commit 20e4f75874

View file

@ -66,8 +66,7 @@ defmodule Linkify.Builder do
defp format_attrs(attrs) do
attrs
|> Enum.map(fn {key, value} -> ~s(#{key}="#{value}") end)
|> Enum.join(" ")
|> Enum.map_join(" ", fn {key, value} -> ~s(#{key}="#{value}") end)
end
defp truncate(url, false), do: url