Markdown to HTML for Elixir, powered by erlmark: a pure Erlang CommonMark 0.31.2 converter with GFM tables, strikethrough and task lists. No NIFs, no system dependencies, and faster than the Rust-based MDEx NIF on most documents.
Installation
def deps do
[
{:erlmark_ex, "~> 0.1"}
]
endUsage
Erlmark.to_html("# Hello *world*")
#=> "<h1>Hello <em>world</em></h1>\n"Options are a keyword list:
# Opt-in GFM autolinks and the tagfilter.
Erlmark.to_html("see www.example.com", extensions: [:autolink, :tagfilter])
# Convert a large document on all schedulers. The output is identical.
Erlmark.to_html(big_markdown, parallel: :auto)| Option | Default | Effect |
|---|---|---|
:extensions | [] | :autolink links bare URLs and e-mail addresses; :tagfilter escapes <script>, <style> and similar tags. |
:parallel | false | :auto or a scheduler count. Splits large documents (16 KB and up). |
:spawn_above | 256 | Inputs above this many bytes are converted in a short-lived process with a pre-sized heap. :infinity never spawns. |
Raw HTML in the input is passed through unchanged, as CommonMark requires. Sanitise the output if the input is untrusted.
Development
This package lives in the elixir/ directory of the
erlmark repository. To build against the sibling
Erlang sources instead of the Hex release:
ERLMARK_PATH=.. mix testLicense
Copyright 2026 Mouhieddine Sabir. Licensed under the Apache License, Version 2.0; see LICENSE.