Packages

Markdown Elixir Native: Comrak, Ammonia, Lumis, and Syntect

Security advisory: This version has known vulnerabilities. View advisories

Current section

Files

Jump to
mdex_native examples markdown_to_xml.exs
Raw

examples/markdown_to_xml.exs

Mix.install([
{:mdex_native, path: Path.expand("..", __DIR__)}
])
markdown = """
## Notes
Markdown can render to XML too.
> Source positions are useful for editor integrations.
"""
options = [render: [sourcepos: true]]
markdown
|> MDExNative.Comrak.markdown_to_xml(options)
|> IO.puts()