logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: ba71bbf6101847292346ba3b1fbe78ce4c385919
parent e9e17e5df34051bce60232890ea042582af31f8c
Author: Alex Gleason <alex@alexgleason.me>
Date:   Tue, 13 Oct 2020 01:53:25 -0500

Improve Formatter.minify/2

Diffstat:

Mlib/pleroma/formatter.ex5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 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