Files
John MacFarlaneandClaude Opus 5.5 4d2ee8caa3 Checkpoint: use OMap for metadata, preserving field order.
Experimental.  This builds against local checkouts, listed in
cabal.project, of pandoc-types and the dependencies that use it
(citeproc, texmath, commonmark-pandoc, pandoc-lua-marshal), in deps/.
In pandoc-types, Meta and MetaMap now hold an OMap instead of a Map.

Code that used Map functions on metadata now uses Data.Map.Ordered.
Metadata fields keep their order:

- YAML metadata (metadata blocks, --metadata-file, references) is
  read into a type whose mappings keep the order of the input; scalars
  are converted as before.  Metadata in defaults files is still read
  through aeson, so its keys come out sorted.

- The JSON reader and JSON filters use pandoc-types' new decodePandoc,
  which preserves the order of metadata fields.

- Lua filters preserve the order (via pandoc-lua-marshal).

Expected test outputs are updated: metadata now appears in the order
in which readers add fields, rather than sorted by key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 09:40:28 -07:00
..
…
…