diff options
author | Alex Gleason <alex@alexgleason.me> | 2021-05-19 13:39:29 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2021-05-19 13:39:29 -0500 |
commit | e343b46ea041ce6a542b23100df2e9c11e262c75 (patch) | |
tree | 7bd219409244d97e51ad58f800889c65f41837a0 /lib/pleroma/formatter.ex | |
parent | a5bbebda588a54cb76d1a75239523db676980eb0 (diff) | |
parent | 8e9f032f25251d910b59c55226d10a305bad3cba (diff) | |
download | pleroma-instance-view-recompilation.tar.gz |
Merge remote-tracking branch 'pleroma/develop' into instance-view-recompilationinstance-view-recompilation
Diffstat (limited to 'lib/pleroma/formatter.ex')
-rw-r--r-- | lib/pleroma/formatter.ex | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex index 7a08e48a9..764e347ec 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, %Earmark.Options{compact_output: true}) + end + def html_escape({text, mentions, hashtags}, type) do {html_escape(text, type), mentions, hashtags} end |