Markdown parser for Gleam.
Find a file
2025-10-19 00:46:44 +02:00
src Autolinks 2025-10-19 00:46:44 +02:00
test Code span tests: Misunderstood behaviour for unclosed spans 2025-10-17 09:46:28 +02:00
.gitignore Generate test cases from spec 2025-10-07 14:58:41 +02:00
gentests.py Code span tests: Misunderstood behaviour for unclosed spans 2025-10-17 09:46:28 +02:00
gleam.toml Use regexp to strip tail from ATX heading 2025-10-13 22:16:01 +02:00
manifest.toml Use regexp to strip tail from ATX heading 2025-10-13 22:16:01 +02:00
mise.toml Add mise file for erlang version and update README 2025-10-17 23:51:28 +02:00
README.md Add mise file for erlang version and update README 2025-10-17 23:51:28 +02:00

mork

Package Version Hex Docs

MÖRK is a Markdown parser written in pure Gleam, with the ambition to be 100% spec compliant with CommonMark and eventually to implement all of the GFM Markdown extensions as well.

NOTE: Mörk is very incomplete at the moment. For more details on what works and what doesn't, see the test suite.

Example

gleam add mork@1
import simplifile
import mork

pub fn main() -> Nil {
  let readme = "./README.md"
  let assert Ok(markdown) = simplifile.read(from: readme)
  let html = markdown |> mork.parse |> mork.to_html
  let assert Ok(_) = html |> simplifile.write(to: "README.html")
}

Further documentation can be found at https://hexdocs.pm/mork.

Development

gleam run   # Run the project
gleam test  # Run the tests

Requirements

  • Gleam 1.12+
  • Erlang 28+ (due to PCRE2 usage)