aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api/utils.ex
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2020-03-29 06:57:34 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2020-03-29 06:57:34 +0300
commitdfd2c741849e9afaf35e3ddbecbb50feb47f5d22 (patch)
tree92d77142391ed6eab45a4bec792ed02be91fbe39 /lib/pleroma/web/common_api/utils.ex
parentedb659dc579fe56227adef0b0704ff13b6ef717e (diff)
parent4e81b4b190161ebb0c496c682fa8e1e0c38a3903 (diff)
downloadpleroma-dfd2c741849e9afaf35e3ddbecbb50feb47f5d22.tar.gz
Merge branch 'develop' into issue/1276
Diffstat (limited to 'lib/pleroma/web/common_api/utils.ex')
-rw-r--r--lib/pleroma/web/common_api/utils.ex4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex
index 8746273c4..635e7cd38 100644
--- a/lib/pleroma/web/common_api/utils.ex
+++ b/lib/pleroma/web/common_api/utils.ex
@@ -331,7 +331,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
def format_input(text, "text/markdown", options) do
text
|> Formatter.mentions_escape(options)
- |> Earmark.as_html!()
+ |> Earmark.as_html!(%Earmark.Options{renderer: Pleroma.EarmarkRenderer})
|> Formatter.linkify(options)
|> Formatter.html_escape("text/html")
end
@@ -591,7 +591,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
limit = Pleroma.Config.get([:instance, :limit])
length = String.length(full_payload)
- if length < limit do
+ if length <= limit do
:ok
else
{:error, dgettext("errors", "The status is over the character limit")}