remove extra new line

pull/1885/head
Ayrat Badykov 6 years ago
parent e7cb2d0be2
commit eeb2204976
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 18
      apps/block_scout_web/lib/block_scout_web/views/address_decompiled_contract_view.ex

@ -76,18 +76,12 @@ defmodule BlockScoutWeb.AddressDecompiledContractView do
part
true ->
result =
part
|> String.split("\n")
|> Enum.reduce("", fn p, a ->
a <> new_style <> p <> "</span>\n"
end)
if String.ends_with?(part, "\n") do
result
else
String.slice(result, 0..-2)
end
part
|> String.split("\n")
|> Enum.reduce("", fn p, a ->
a <> new_style <> p <> "</span>\n"
end)
|> String.slice(0..-2)
end
end
end

Loading…
Cancel
Save