primary source of my static site generator for my blog, the github link is a mirror for github actions
Find a file
Pagwin 0f356e4d5e
property tests for the djot parser
Expectations come from the djot syntax reference and IR.hs rather than
from what the parser currently produces, so a failure is evidence of a
bug instead of a record of one. 55 properties: 32 inline (emphasis,
verbatim, math, raw, links, images, references, autolinks, spans,
attributes, footnotes, symbols, escapes, smart punctuation) and 23 block
(headings, quotes, breaks, code fences, divs, raw blocks, every ordered
marker style and delimiter, tight vs loose items, nesting, task lists,
definition lists, tables, definitions, block attributes, round trip).

Two rules are deliberately unasserted and noted in the module header:
headings of seven or more hashes, and the general verbatim space
stripping rule, of which only the unambiguous backtick case is tested.

Three deviations the suite found, fixed in Djot.hs:

- an unclosed verbatim span failed the construct back into plain text.
  The reference says it "extends to the end of the text"; manyTill
  cannot say that on its own, it needs the eof alternative.
- a task list checkbox was recognised without the space the reference
  requires after it, so "1. [x](5)" ate a link and turned it into a
  checked item containing a list starting at 5.
- checkboxes were recognised on ordered items, but the reference gives
  them to bullet items only.

Test.Gen.Document is now shared by both suites. Syntax grew
quoteContent and listTypeFor for the two places markdown and djot
disagree about the resulting IR, and two djot facts became generator
invariants rather than assertions: adjacent markup sharing a delimiter
is ambiguous, so runs separate it, and a blank line between two lists
makes one loose list rather than two blocks, so documents never place
lists back to back.

The test suite is no longer markdown only, so it is just "tests" now.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 17:21:57 -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 property tests for the djot parser 2026-09-04 17:21:57 -04:00
tests property tests for the djot parser 2026-09-04 17:21:57 -04:00
.dockerignore added .git to .dockerignore 2025-12-13 18:52:41 -05:00
.gitignore swap hedgehog out for QuickCheck 2026-09-04 15:39:36 -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 property tests for the djot parser 2026-09-04 17:21:57 -04:00
TODO.md some TODO planning 2026-05-05 15:07:27 -04:00