From: Alex Gleason Date: Tue, 13 Oct 2020 06:53:25 +0000 (-0500) Subject: Improve Formatter.minify/2 X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=ba71bbf6101847292346ba3b1fbe78ce4c385919;p=akkoma Improve Formatter.minify/2 --- diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex index b0e4a84ae..61906dda6 100644 --- a/lib/pleroma/formatter.ex +++ b/lib/pleroma/formatter.ex @@ -143,7 +143,10 @@ defmodule Pleroma.Formatter do end def minify(text, "text/html") do - String.replace(text, "\n", "") + text + |> String.replace(">\n", ">") + |> String.replace("> ", ">") + |> String.replace(" <", "<") end def truncate(text, max_length \\ 200, omission \\ "...") do