Package Version Hex Docs Erlang-compatible JavaScript-compatible

gleam add commonmark
import commonmark
import gleam/io

pub fn main() {
  "# Hello, Gleam!

This is a test."
  |> commonmark.render_to_html
  |> io.println
  // -> "<h1>Hello, Gleam!</h1>\n<p>This is a test.</p>\n"

Further documentation can be found at

You can view this README as an AST here.

Syntax support

๐Ÿšง This package is still heavily under construction ๐Ÿšง

โœ… - Completed | ๐Ÿšง - In Progress | โŒ - Unsupported


The current version of CommonMark targetted is 0.31.2.

Raw HTML features will be tackled last as the potential security issues around this need to be considered.

Github Flavoured Markdown

The current version of GFM targetted is 0.29-gfm.


gleam test  # Run the tests
gleam shell # Run an Erlang shell
โœจ Search Document