IMP: Markdown support (#23)
This commit is contained in:
parent
c1b72074ea
commit
676de86157
6 changed files with 19 additions and 4 deletions
lib/planner_web/views
10
lib/planner_web/views/util.ex
Normal file
10
lib/planner_web/views/util.ex
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue