diff options
author | Alex Gleason <alex@alexgleason.me> | 2021-05-29 12:29:58 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2021-05-29 12:29:58 -0500 |
commit | 1a69f59221b7009ab76df9abf24403d2711dbaf3 (patch) | |
tree | 81c71c2290a5d0c3ffe4857ec480ebf14788668e /lib/pleroma/formatter.ex | |
parent | 3ff9c5e2a67ab83c2abdb14cd246dea059079e75 (diff) | |
parent | 8871ca5aa35e9533e57b4a15420687869378a981 (diff) | |
download | pleroma-1a69f59221b7009ab76df9abf24403d2711dbaf3.tar.gz |
Merge remote-tracking branch 'pleroma/develop' into cycles-html
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 |