primary source of my static site generator for my blog, the github link is a mirror for github actions
Find a file
Pagwin d695910c7c
implement the djot parser
Fills out src/Djot.hs, which was a skeleton of `error "todo"` stubs.

Three layers, so container prefixes and indentation never have to be
threaded through the parser state:

  - line primitives (rawLine/peekLine/lineWhen/dedent): block parsers peek
    at the next line, decide whether they want it, then consume it
  - container blocks strip their prefix off the lines they own and re-parse
    the result with subParse, a rank-2 helper that runs a polymorphic parser
    at Identity and shifts error offsets back into the outer input
  - inline content is a second pass over the text a block collected

Blocks: headings, paragraphs, block quotes, fenced code, raw blocks, divs,
tables (alignments, `^` captions, escaped pipes), footnote and reference
definitions, block attributes, thematic breaks, and lists -- bullet,
ordered (decimal/alpha/roman, `.`/`)`/`(n)`), task, and definition. Tight
lists unwrap their paragraphs to Transparent.

Inlines: emphasis and its braced forms, verbatim, raw inline, math, links,
reference links, images, autolinks, spans, footnote references, symbols,
escapes, hard breaks, attribute sets, and smart punctuation.

Two spots where the IR came up short:

  - there is no reference image, so for `![alt][ref]` the label lands in
    the url field
  - unordered lists get style = Nothing rather than the bullet character,
    which HTML.hs would otherwise emit as an invalid type="-"

Also includes the psb.cabal fix dropping OverloadedRecordUpdate, without
which Psb.Main does not build.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 15:15:33 -04:00
.github/workflows version bump due to being close to the point where I'll start using this 2025-11-26 21:02:22 -05:00
app moved everything into src for ease of testing 2025-12-05 19:42:15 -05:00
src implement the djot parser 2026-09-04 15:15:33 -04:00
tests/Markdown fixed HTML block case, and greedy plain inline text 2025-12-13 16:53:23 -05:00
.dockerignore added .git to .dockerignore 2025-12-13 18:52:41 -05:00
.gitignore minor fuckup with static files 2024-08-02 01:03:09 -04:00
action.yml updated action.yml 2025-12-13 20:00:45 -05:00
CHANGELOG.md changelog 2025-12-13 20:06:26 -05:00
Dockerfile fixed docker issues 2026-02-26 01:32:12 -05:00
LICENSE initial commit after moving out of repo 2024-07-20 16:49:21 -04:00
psb.cabal implement the djot parser 2026-09-04 15:15:33 -04:00
TODO.md some TODO planning 2026-05-05 15:07:27 -04:00