X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fcommon_api%2Futils.ex;h=15016eb47dea78cc5eb9bcbfd3a50ab4d95b2bf1;hb=e9f1897cfdb32c890e9eaf2e894128be5c7e1123;hp=61af71acd206f75a46c4892472e549483d9d7e2c;hpb=5796d81d9877de51b2669da7d8f6fcc903c0ebda;p=akkoma diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index 61af71acd..15016eb47 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -285,11 +285,11 @@ defmodule Pleroma.Web.CommonAPI.Utils do def format_input(text, "text/x.misskeymarkdown", options) do text + |> Formatter.markdown_to_html() + |> MfmParser.Parser.parse() + |> MfmParser.Encoder.to_html() |> Formatter.linkify(options) - |> Formatter.html_escape("text/x.misskeymarkdown") - |> (fn {text, mentions, tags} -> - {String.replace(text, ~r/\r?\n/, "
"), mentions, tags} - end).() + |> Formatter.html_escape("text/html") end def format_input(text, "text/markdown", options) do