Merge branch 'bugfix/br-vs-newline' into 'develop'

Formatting: Do not use \n and prefer <br> instead

Closes #1374 and #1375

See merge request pleroma/pleroma!2204
This commit is contained in:
rinpatch 2020-03-13 18:22:55 +00:00
commit 3e0f05f08e
7 changed files with 357 additions and 20 deletions

View file

@ -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