X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpleroma%2Fformatter.ex;h=764e347ec04583e1d3c6031a6ecba988f0efc134;hb=bf2ee12fdb4e7d95e1cbf040a4406901b60ddfa2;hp=2aa236ca9e7220a2cfcccb549f4dde5eafe19f49;hpb=6520599b7deac56780e1496c969cc45ff2e9f5da;p=akkoma
diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex
index 2aa236ca9..764e347ec 100644
--- a/lib/pleroma/formatter.ex
+++ b/lib/pleroma/formatter.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Formatter do
@@ -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}")