Fix credo warnings

This commit is contained in:
Egor Kislitsyn 2019-06-12 15:33:03 +07:00
parent cef4fe335c
commit d9859f8aab

View file

@ -273,13 +273,13 @@ defmodule AutoLinker.Parser do
end
defp parse_link(str, %{scheme: true}) do
Regex.run(@match_scheme, str, capture: [:url]) |> hd()
@match_scheme |> Regex.run(str, capture: [:url]) |> hd()
end
defp parse_link(str, _), do: str
defp strip_parens("(" <> buffer) do
Regex.run(~r/[^\)]*/, buffer) |> hd()
~r/[^\)]*/ |> Regex.run(buffer) |> hd()
end
defp strip_parens(buffer), do: buffer