Repository navigation
feat(lmd): inline cells render numbers and booleans as tostring would (bd-iqd6niat) - #852
Merged
Merged
Conversation
…on + repro)
Plan skeleton with triage verdict (ready to design) and the design
question of where a Lua number becomes text, given divergence D-num
and the fact that pandoc itself rejects pandoc.Strong(3). Repro
fixture and captured output under lmd-inline-numbers-investigation/.
Sibling shortcode bug ({{< meta >}} with a YAML real renders nothing)
filed as bd-32nrymty.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… (bd-iqd6niat)
q2 metadata hands lmd cells real Lua numbers and booleans (divergence
D-num), so `{lmd} meta.version` with `version: 12.1` used to fail the
inline contract and force the author to write tostring(meta.version).
The inline-cell boundary now accepts Value::Integer / Number / Boolean,
alone and inside a list, formatting them through lua_tolstring (so the
bare form and a hand-written tostring() cannot drift) and reading the
result as a string. Block cells still reject numbers, and constructors
inside a cell keep pandoc's strictness (pandoc.Strong(3) is an error in
pandoc 3.11 too); widening the fuzzy layer is bd-q4gnd5os.
The NotInlines message and the stage hint list the new accepted values;
the lmd cells fixture gains a metadata numbers/booleans paragraph and
its snapshots are updated. Plan records the decisions (option b).
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
…hanges Two lmd changes landed on main while PR #855 was open, and the page had documented both as limitations: - #850 (bd-7gqr148v): tables inside fragments are emitted as pandoc.Table, so Q-26-2 no longer lists them and the limitation bullet is gone. - #852 (bd-iqd6niat): a top-level inline cell writes numbers and booleans as tostring would. The metadata examples drop tostring(); the page, Q-26-6 and the catalog say where it is still needed: constructor arguments and inline cells spliced inside a fragment (bd-q4gnd5os tracks lifting that). Example 02, the patterns fixture and its snapshot follow. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Oct 16, 2026
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
q2 metadata hands lmd cells real Lua numbers and booleans (divergence D-num), so
`{lmd} meta.version`withversion: 12.1failed the inline-cell contract ("evaluated to a number") and forced authors to writetostring(meta.version).classify_inline_valueincrates/pampa/src/lua/lmd.rs) now accepts integers, floats and booleans, alone and inside a list. A newscalar_texthelper formats them throughlua_tolstring, so the bare form and a hand-writtentostring()cannot drift (3,12.1,1e+15,3.0,true).pandoc.Strong(3)is an error in pandoc 3.11 too. Widening pampa's fuzzy inline layer is filed separately as bd-q4gnd5os, since it would be a new divergence from pandoc.NotInlinesmessage and the stage hint list the new accepted values.cells.qmdfixture gains a metadata numbers/booleans paragraph;cells.md.snapanderrors.stderr.snapare updated accordingly (reviewed: only the new paragraph and the wording change).Design decisions and the investigation (including the finding that pandoc never exposes YAML numbers as Lua numbers, and that it rejects
pandoc.Strong(3)) are inclaude-notes/plans/2026-10-16-lmd-inline-numbers.md. Related: bd-32nrymty ({{< meta key >}}with a YAML real renders an empty string; not fixed here).Test plan
inline_cells_format_numbers_and_booleans_like_tostring(pampa, unit)inline_cells_render_metadata_numbers_and_booleans(quarto-core, throughLmdExecuteStage)lmd_fixtures_render_as_snapshottedwith the extendedcells.qmdcargo xtask verify --skip-hub-buildgreen locally (14/14 steps, 16485 tests)🤖 Generated with Claude Code