Refactor Earmark code, fix tests

This commit is contained in:
Alex Gleason 2020-10-13 14:27:50 -05:00 committed by Mark Felder
commit f8c93246d6
6 changed files with 14 additions and 8 deletions

View file

@ -121,6 +121,10 @@ defmodule Pleroma.Formatter do
end
end
def markdown_to_html(text) do
Earmark.as_html!(text)
end
def html_escape({text, mentions, hashtags}, type) do
{html_escape(text, type), mentions, hashtags}
end