aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api
diff options
context:
space:
mode:
authorminibikini <egor@kislitsyn.com>2020-10-27 18:59:19 +0000
committerminibikini <egor@kislitsyn.com>2020-10-27 18:59:19 +0000
commit1bfd8528bbc71c8c34253eb245de7df498064fb4 (patch)
tree97387260c85bb6b5505924de806110d8f71eb3fc /lib/pleroma/web/common_api
parent18a91d85e59eb67a2d58a28aae732c34b75ebe97 (diff)
parent5aff4799515c141cb0a42686733b2f40faba6f86 (diff)
downloadpleroma-1bfd8528bbc71c8c34253eb245de7df498064fb4.tar.gz
Merge branch 'develop' into 'feature/local-only-scope'
# Conflicts: # CHANGELOG.md
Diffstat (limited to 'lib/pleroma/web/common_api')
-rw-r--r--lib/pleroma/web/common_api/utils.ex11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex
index d57ba4209..abf6c40d5 100644
--- 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 """
- Formatting text to plain text.
+ Formatting text to plain text, BBCode, HTML, or Markdown
"""
def format_input(text, "text/plain", options) do
text
@@ -274,9 +274,6 @@ defmodule Pleroma.Web.CommonAPI.Utils do
end).()
end
- @doc """
- Formatting text as BBCode.
- """
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
- @doc """
- Formatting text to html.
- """
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)