https://github.com/lpil/jot
A parser for Djot, a markdown-like language.
https://github.com/lpil/jot
Last synced: 4 months ago
JSON representation
A parser for Djot, a markdown-like language.
- Host: GitHub
- URL: https://github.com/lpil/jot
- Owner: lpil
- Created: 2023-11-15T19:46:10.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-01-13T22:50:26.000Z (4 months ago)
- Last Synced: 2026-01-14T00:50:42.695Z (4 months ago)
- Language: Gleam
- Homepage:
- Size: 129 KB
- Stars: 53
- Watchers: 1
- Forks: 19
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
- awesome-gleam - jot - [📚](https://hexdocs.pm/jot/) - A parser for Djot, a markdown-like language (Packages / Formats)
- awesome-djot - lpil/jot - Djot parser in Gleam. (Parsers & Libraries / Gleam)
README
# jot
A parser for [Djot][djot], a markdown-like language.
[djot]: https://djot.net/
[](https://hex.pm/packages/jot)
[](https://hexdocs.pm/jot/)
```sh
gleam add jot@10
```
```gleam
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 .
## Status
This project is a work in progress. So far it supports:
- [x] Autolinks (email and URL)
- [x] Block attributes
- [x] Block quotes
- [x] Code blocks
- [x] Content escaping
- [x] Div
- [x] Emphasis and strong
- [x] Footnotes
- [x] Headings
- [x] Images (with attributes support)
- [x] Inline code
- [x] Inserts, deletes, and marks.
- [x] Links (inline and reference, with attributes support)
- [x] Manual line breaks
- [x] Maths (inline and display)
- [x] Non-breaking spaces
- [x] Ordered lists with the `1.`, `1)`, and `(1)` syntaxes
- [x] Paragraphs
- [x] Raw blocks
- [x] Smart replacing of `...` with ellipsis
- [x] Smart replacing of hyphens with dashes
- [x] Span with attributes
- [x] Symbols
- [x] Thematic breaks
- [x] Unordered lists