mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-14 03:24:04 +00:00
Improve Formatter.minify/2
This commit is contained in:
parent
e9e17e5df3
commit
ba71bbf610
|
@ -143,7 +143,10 @@ defmodule Pleroma.Formatter do
|
||||||
end
|
end
|
||||||
|
|
||||||
def minify(text, "text/html") do
|
def minify(text, "text/html") do
|
||||||
String.replace(text, "\n", "")
|
text
|
||||||
|
|> String.replace(">\n", ">")
|
||||||
|
|> String.replace("> ", ">")
|
||||||
|
|> String.replace(" <", "<")
|
||||||
end
|
end
|
||||||
|
|
||||||
def truncate(text, max_length \\ 200, omission \\ "...") do
|
def truncate(text, max_length \\ 200, omission \\ "...") do
|
||||||
|
|
Loading…
Reference in a new issue