Repository navigation
fix(pampa): default list attributes serialize as DefaultStyle/DefaultDelim (bd-3h6iasmz) - #857
Merged
Merged
Conversation
…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>
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
cscheid
pushed a commit
that referenced
this pull request
Oct 16, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pandoc.OrderedList(items)with no explicit attributes carriesListAttributes (1, Default, Default). Both JSON writers tagged those{"t": "Default"}, which pandoc rejects, so every pandoc-leg format (--to markdown,docx,pdf, ...) failed withQ-20-3on such a list while the native HTML writer rendered it fine. The native writer printedDecimal/Periodfor the same values, with a comment asking whether that was right.Seven sites spelled these names by hand.
ListNumberStyleandListNumberDelim(inquarto-pandoc-types) now carrypandoc_name()/from_pandoc_name(), with anALLconstant so the inverse is derived, and the JSON writers and reader, the native writer, the Lua constructors,showand the lmd emitter delegate to them. The native writer now printsDefaultStyle/DefaultDelim, which is what pandoc itself prints.The lmd authoring guide,
examples/lmd/03-listsand 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 bareOrderedListwritten to JSON and native carriesDefaultStyle/DefaultDelim, and the JSON reads back.patterns.md.snap(quarto lmd snapshots) now renders a barepandoc.OrderedListthrough pandoc; output unchanged.pandoc.OrderedList,q2 render --to markdown):Q-20-3before,1. a/2. bafter.Verification
pampa (5242 tests), quarto-pandoc-types, quarto-core lmd (72), quarto lmd snapshots all green;
cargo xtask lint, clippy-D warningson the four crates,cargo fmt --checkclean; the lmd page and the plan render under--strict.🤖 Generated with Claude Code