Remove Pleroma.Formatter.minify/2
This commit is contained in:
parent
004bcedb07
commit
6727a3659f
4 changed files with 0 additions and 20 deletions
|
|
@ -142,17 +142,6 @@ defmodule Pleroma.Formatter do
|
|||
|> Enum.join("")
|
||||
end
|
||||
|
||||
def minify({text, mentions, hashtags}, type) do
|
||||
{minify(text, type), mentions, hashtags}
|
||||
end
|
||||
|
||||
def minify(text, "text/html") do
|
||||
text
|
||||
|> String.replace(">\n", ">")
|
||||
|> String.replace("> ", ">")
|
||||
|> String.replace(" <", "<")
|
||||
end
|
||||
|
||||
def truncate(text, max_length \\ 200, omission \\ "...") do
|
||||
# Remove trailing whitespace
|
||||
text = Regex.replace(~r/([^ \t\r\n])([ \t]+$)/u, text, "\\g{1}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue