projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' into 'feature/local-only-scope'
[akkoma]
/
lib
/
pleroma
/
web
/
common_api
/
utils.ex
diff --git
a/lib/pleroma/web/common_api/utils.ex
b/lib/pleroma/web/common_api/utils.ex
index d57ba4209f459ef74df42bc83c30b466b643e133..abf6c40d5d4af93c6eaa4234b82fe087890722d2 100644
(file)
--- a/
lib/pleroma/web/common_api/utils.ex
+++ b/
lib/pleroma/web/common_api/utils.ex
@@
-263,7
+263,7
@@
defmodule Pleroma.Web.CommonAPI.Utils do
def format_input(text, format, options \\ [])
@doc """
def format_input(text, format, options \\ [])
@doc """
- Formatting text to plain text
.
+ Formatting text to plain text
, BBCode, HTML, or Markdown
"""
def format_input(text, "text/plain", options) do
text
"""
def format_input(text, "text/plain", options) do
text
@@
-274,9
+274,6
@@
defmodule Pleroma.Web.CommonAPI.Utils do
end).()
end
end).()
end
- @doc """
- Formatting text as BBCode.
- """
def format_input(text, "text/bbcode", options) do
text
|> String.replace(~r/\r/, "")
def format_input(text, "text/bbcode", options) do
text
|> String.replace(~r/\r/, "")
@@
-286,18
+283,12
@@
defmodule Pleroma.Web.CommonAPI.Utils do
|> Formatter.linkify(options)
end
|> Formatter.linkify(options)
end
- @doc """
- Formatting text to html.
- """
def format_input(text, "text/html", options) do
text
|> Formatter.html_escape("text/html")
|> Formatter.linkify(options)
end
def format_input(text, "text/html", options) do
text
|> Formatter.html_escape("text/html")
|> Formatter.linkify(options)
end
- @doc """
- Formatting text to markdown.
- """
def format_input(text, "text/markdown", options) do
text
|> Formatter.mentions_escape(options)
def format_input(text, "text/markdown", options) do
text
|> Formatter.mentions_escape(options)