projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9e17e5
)
Improve Formatter.minify/2
author
Alex Gleason
<alex@alexgleason.me>
Tue, 13 Oct 2020 06:53:25 +0000
(
01:53
-0500)
committer
Mark Felder
<feld@FreeBSD.org>
Fri, 11 Dec 2020 23:22:24 +0000
(17:22 -0600)
lib/pleroma/formatter.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/formatter.ex
b/lib/pleroma/formatter.ex
index b0e4a84ae8ed43dfbc243bde53eef0557d93d0b9..61906dda6aa406c79a30ebb8de060c3fa8a57fbb 100644
(file)
--- 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