common api: fix newlines in markdown code blocks

This commit is contained in:
William Pitcock 2019-01-10 02:22:11 +00:00
parent be92edcb29
commit 2ecf81f10c

View file

@ -150,7 +150,6 @@ def format_input(text, mentions, tags, "text/markdown") do
|> Formatter.mentions_escape(mentions) |> Formatter.mentions_escape(mentions)
|> Earmark.as_html!() |> Earmark.as_html!()
|> Formatter.html_escape("text/html") |> Formatter.html_escape("text/html")
|> String.replace(~r/\r?\n/, "")
|> (&{[], &1}).() |> (&{[], &1}).()
|> Formatter.add_user_links(mentions) |> Formatter.add_user_links(mentions)
|> Formatter.add_hashtag_links(tags) |> Formatter.add_hashtag_links(tags)