Padmark

Pure-Elixir Markdown to HTML converter with zero NIFs or native dependencies.

v1.4.51 Elixir Apache-2.0

Padmark is a pure-Elixir Markdown to HTML converter maintained under Lambdapad. It has no native dependencies, no NIFs, and no external binaries, so it compiles and runs anywhere Elixir does — including inside a Mix escript like lpad.

Forked from Earmark to preserve a pure-Elixir Markdown parser, Padmark includes security fixes (stored XSS via unescaped HTML attribute values), bug fixes, and expanded test coverage.

Installation

def deps do
  [
    {:padmark, "~> 1.4"}
  ]
end

Usage

Padmark.as_html!("# Hello Padmark")
# "<h1>\nHello Padmark</h1>\n"

{:ok, html, []} = Padmark.as_html("*emphasis* and **strong**")