Replace abandoned earmark with mdex for markdown rendering

This commit is contained in:
2026-06-21 16:07:44 +02:00
parent 7c38061c1c
commit 562eed2b98
6 changed files with 16 additions and 17 deletions

View File

@@ -279,9 +279,9 @@ defmodule BDS.Desktop.ShellLive.MiscEditor do
@spec markdown_html(String.t()) :: Phoenix.HTML.safe()
def markdown_html(content) do
html =
case Earmark.as_html(content || "", escape: true) do
{:ok, rendered, _messages} -> rendered
{:error, rendered, _messages} -> rendered
case MDEx.to_html(content || "") do
{:ok, rendered} -> rendered
{:error, _reason} -> ""
end
raw(html)