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

It moves bbcode to bbcode_pleroma as the former is owned by kaniini
and transfering ownership wasn't done in a timely manner.

Closes: https://git.pleroma.social/pleroma/pleroma/issues/1374
Closes: https://git.pleroma.social/pleroma/pleroma/issues/1375
This commit is contained in:
Haelwenn (lanodan) Monnier 2020-02-13 03:39:47 +01:00
commit d1379c4de8
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE
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