Playground
Mix.install([:req, :mdex])
HTML
defmodule Playground do
@markdown Req.get!("https://raw.githubusercontent.com/leandrocp/mdex/refs/heads/main/README.md").body
def run do
MDEx.to_html!(
@markdown,
extension: [
strikethrough: true,
tagfilter: true,
table: true,
autolink: true,
tasklist: true,
footnotes: true,
shortcodes: true,
],
parse: [
smart: true,
relaxed_tasklist_matching: true,
relaxed_autolinks: true
],
render: [
unsafe: true,
],
syntax_highlight: [formatter: {:html_inline, theme: "github_light"}]
)
end
end
Playground.run()
|> IO.puts()