X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fformatter.ex;h=ae37946ab79630af6111ae439a8849a33df4f379;hb=3c5a497b19237c5e4f0f5d7aeb3fa1e43f13d932;hp=535ad5f1060245629864c62d23689edc507231cf;hpb=51a9f97e87823cbd9e92c375f4bc4c0bfa8b79db;p=akkoma diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex index 535ad5f10..ae37946ab 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