Skip to content

fix(pampa): default list attributes serialize as DefaultStyle/DefaultDelim (bd-3h6iasmz) - #857

Merged
cscheid merged 3 commits into
mainfrom
bugfix/bd-3h6iasmz-orderedlist-default-attrs
Oct 16, 2026
Merged

cscheid merged 3 commits into
mainfrom
bugfix/bd-3h6iasmz-orderedlist-default-attrs

Conversation

@cscheid

@cscheid cscheid commented Oct 16, 2026

Copy link
Copy Markdown
Member

Summary

pandoc.OrderedList(items) with no explicit attributes carries ListAttributes (1, Default, Default). Both JSON writers tagged those {"t": "Default"}, which pandoc rejects, so every pandoc-leg format (--to markdown, docx, pdf, ...) failed with Q-20-3 on such a list while the native HTML writer rendered it fine. The native writer printed Decimal / Period for the same values, with a comment asking whether that was right.

Seven sites spelled these names by hand. ListNumberStyle and ListNumberDelim (in quarto-pandoc-types) now carry pandoc_name() / from_pandoc_name(), with an ALL constant so the inverse is derived, and the JSON writers and reader, the native writer, the Lua constructors, show and the lmd emitter delegate to them. The native writer now prints DefaultStyle / DefaultDelim, which is what pandoc itself prints.

The lmd authoring guide, examples/lmd/03-lists and the patterns fixture drop the documented workaround (pandoc.ListAttributes(1, "Decimal", "Period")) and its limitation bullet.

Strand: bd-3h6iasmz (discovered from the lmd docs work, #855). Plan: claude-notes/plans/2026-10-16-orderedlist-default-attributes.md.

Tests

  • quarto-pandoc-types: round-trip unit test for the names; Default (the Rust variant name) is not accepted.
  • pampa::lua::readwrite: a bare OrderedList written to JSON and native carries DefaultStyle / DefaultDelim, and the JSON reads back.
  • patterns.md.snap (quarto lmd snapshots) now renders a bare pandoc.OrderedList through pandoc; output unchanged.
  • Repro (one lmd cell returning pandoc.OrderedList, q2 render --to markdown): Q-20-3 before, 1. a / 2. b after.

Verification

pampa (5242 tests), quarto-pandoc-types, quarto-core lmd (72), quarto lmd snapshots all green; cargo xtask lint, clippy -D warnings on the four crates, cargo fmt --check clean; the lmd page and the plan render under --strict.

🤖 Generated with Claude Code

t and others added 3 commits October 16, 2026 15:23
…as pandoc does (bd-3h6iasmz)

A pandoc.OrderedList built with no explicit attributes carries
ListAttributes (1, Default, Default). Both JSON writers tagged those
{"t": "Default"}, which pandoc rejects, so every pandoc-leg format
(markdown, docx, pdf, ...) failed with Q-20-3 on such a list while the
native HTML writer rendered it fine. The native writer printed Decimal and
Period for the same values, with a comment asking whether that was right.

Seven sites spelled these names by hand. ListNumberStyle and
ListNumberDelim now carry pandoc_name() / from_pandoc_name() (with an ALL
constant so the inverse is derived), and the JSON writers and reader, the
native writer, the Lua constructors, show and the lmd emitter delegate to
them. A readwrite test writes a bare OrderedList to JSON and native,
checks the names, and reads the JSON back.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…6iasmz)

The lmd authoring guide, example 03 and the patterns fixture drop the
explicit pandoc.ListAttributes(1, "Decimal", "Period") workaround and the
matching limitation bullet. The fixture's markdown snapshot goes through
pandoc, so it pins the fix end to end; its output is unchanged. Plan file
for the strand.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@posit-snyk-bot

posit-snyk-bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cscheid
cscheid merged commit aa128f9 into main Oct 16, 2026
11 checks passed
@cscheid
cscheid deleted the bugfix/bd-3h6iasmz-orderedlist-default-attrs branch October 16, 2026 21:26
cscheid pushed a commit that referenced this pull request Oct 16, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants