Markdown parser for Gleam.
src | ||
test | ||
.gitignore | ||
gentests.py | ||
gleam.toml | ||
manifest.toml | ||
mise.toml | ||
README.md |
mork
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)