X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fcommon_api%2Fcommon_api_utils_test.exs;h=684f2a23f662c5dedcfe86c8639676fd81fd9793;hb=5d961d536cd190c8201d53624680a6f3384ffd9b;hp=dc7b4c229af95178a4ff2f6d2f034e46c1dd5105;hpb=1c265b3b19bacd2e0a9ccfee0f7e53a59d83a621;p=akkoma diff --git a/test/web/common_api/common_api_utils_test.exs b/test/web/common_api/common_api_utils_test.exs index dc7b4c229..684f2a23f 100644 --- a/test/web/common_api/common_api_utils_test.exs +++ b/test/web/common_api/common_api_utils_test.exs @@ -104,6 +104,18 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do {output, [], []} = Utils.format_input(text, "text/markdown") assert output == expected + + text = """ + > cool quote + + by someone + """ + + expected = "
\ncool quote
\n
by someone
\n" + + {output, [], []} = Utils.format_input(text, "text/markdown") + + assert output == expected end test "works for text/markdown with mentions" do @@ -113,11 +125,11 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do text = "**hello world**\n\n*another @user__test and @user__test google.com paragraph*" expected = - "hello world
\nanother @user__test and @user__test google.com paragraph
\n" + }\" class=\"u-url mention\" href=\"http://foo.com/user__test\">@user__test google.com paragraph\n" {output, _, _} = Utils.format_input(text, "text/markdown")