Apply 1 suggestion(s) to 1 file(s)

This commit is contained in:
feld 2021-01-28 17:16:39 +00:00 committed by Mark Felder
parent 5191250de4
commit fb88baabac

View file

@ -245,10 +245,14 @@ defmodule Linkify.Parser do
end
end
defp trim_leading_paren(buffer),
do:
(String.starts_with?(buffer, "(") && String.slice(buffer, 1, String.length(buffer))) ||
defp trim_leading_paren(buffer) do
if String.starts_with?(buffer, "(") do
"(" <> buffer = buffer
buffer
else
buffer
end
end
defp trim_trailing_paren(buffer),
do: