IMP: Markdown support ()

This commit is contained in:
Matthew Ryan Dillon 2020-06-25 21:18:05 -07:00 committed by GitHub
parent c1b72074ea
commit 676de86157
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 4 deletions
lib/planner_web/views

View file

@ -0,0 +1,10 @@
defmodule PlannerWeb.Util do
import Phoenix.HTML
alias Earmark.Options
def md_to_html(md_text) do
md_text
|> Earmark.as_html!(%Options{smartypants: false})
|> raw
end
end