aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/formatter.ex
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2020-10-13 14:27:50 -0500
committerMark Felder <feld@FreeBSD.org>2020-12-11 17:22:42 -0600
commitf8c93246d69a193ead81248879ba260e98673b3d (patch)
tree493fdc9f2b3b4b2aa0734db6a2d7f9fd1b81ac7f /lib/pleroma/formatter.ex
parentb2548cfcdabdcb90bfcc9f4022c0b1cff9157a4a (diff)
downloadpleroma-f8c93246d69a193ead81248879ba260e98673b3d.tar.gz
Refactor Earmark code, fix tests
Diffstat (limited to 'lib/pleroma/formatter.ex')
-rw-r--r--lib/pleroma/formatter.ex4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex
index 61906dda6..1be12055f 100644
--- a/lib/pleroma/formatter.ex
+++ b/lib/pleroma/formatter.ex
@@ -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