A parser for Djot, a markdown-like language.
gleam add jot
import jot
const document = "
# Hello, Joe!
This is a [Djot][djot] document.
[djot]: https://www.djot.net/
"
pub fn main() {
// Turn the document into HTML
let html = jot.to_html(document)
// Alternatively, parse the document to an AST
let ast = jot.parse(document)
}
Further documentation can be found at https://hexdocs.pm/jot.
This project is a work in progress. So far it supports:
- Headings
- Paragraphs
- Links (inline and reference)
- Images
- Code blocks
- Inline code
- Emphasis and strong
- Block attributes
- Manual line breaks
- Thematic breaks