From d9859f8aabb7ef2b54b6cc85560bc456cd4858d1 Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Wed, 12 Jun 2019 15:33:03 +0700 Subject: [PATCH] Fix credo warnings --- lib/auto_linker/parser.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/auto_linker/parser.ex b/lib/auto_linker/parser.ex index defb590..739173f 100644 --- a/lib/auto_linker/parser.ex +++ b/lib/auto_linker/parser.ex @@ -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