Markdown parser for Gleam.
Find a file
2025-11-25 11:31:46 +01:00
data Switch humanmade logo to brainmade badge instead 2025-11-25 11:30:56 +01:00
examples/cli Move casefold to a separate package 2025-11-13 15:37:38 +01:00
gen Add emojis.get() and rename entities.resolve() to entities.get() 2025-11-16 15:02:17 +01:00
src Switch humanmade logo to brainmade badge instead 2025-11-25 11:30:56 +01:00
test Split line for aesthethics 2025-11-25 11:31:46 +01:00
.gitignore make a bigger benchmark 2025-11-09 09:24:20 +01:00
bench.sh This fixes bun 2025-11-16 00:11:25 +01:00
CHANGELOG.md Emoji short codes 2025-11-16 19:35:22 +01:00
DEVELOPMENT.md Added some documentation for developers and updated the TODOs 2025-11-10 23:46:02 +01:00
gleam.toml Publish TODOs to hexdocs 2025-11-16 20:24:27 +01:00
manifest.toml Add public function to get frontmatter 2025-11-14 15:26:26 +01:00
mise.toml Add mise file for erlang version and update README 2025-10-17 23:51:28 +02:00
README.md Split line for aesthethics 2025-11-25 11:31:46 +01:00
TODO.md maybe use gluri for URI normalization? 2025-11-16 22:22:03 +01:00

mork

Package Version Hex Docs

Brainmade

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.

It has mainly been developed for the Erlang compilation target, but is tested against and should work for both Node.js, Deno and Bun as Javascript runtimes.

Status

  • All Commonmark spec tests are passing.
  • See TODO.md for details on extended syntax support.

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 build        # Build the project
gleam test         # Run the tests
gleam test tabs    # Run only the Tabs section of tests
gleam test tabs 9  # Run only example number 9 from the test section
gleam test custom  # Run only extra tests (not from the spec)

Requirements (Erlang)

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

Requirements (Javascript)

  • Gleam 1.13+

Data sources