The composite figure drops its panels wrapper - #1306
Merged
Conversation
PART 9 section 4c revision (markup-carve/carve#1122), ruled before any release carries the shape. The `<div class="carve-figure-panels">` wrapper is gone: panels and preserved stray content nest DIRECTLY inside `<figure class="carve-figure-group">`, one indent level up, with the group's `<figcaption>` last and `carve-figure-panel` unchanged on each panel. HTML's content model for `figure` is one `figcaption` first-or-last plus flow content, and a `figure` is itself flow content - so the wrapper drew a box the element already provides, and a consumer styling the group can select `.carve-figure-group > .carve-figure-panel` exactly as it could select the div. Pandoc's subfigure HTML output has the same flat shape, which the sibling engines match byte for byte through the shared corpus. The HTML importer reads the flat shape back: panels are the direct `figure.carve-figure-panel` children of the group and the group caption is the direct `figcaption` child - a panel's own caption sits inside the panel figure, so the direct-child scan never confuses the two. An empty uncaptioned group keeps the bare-container empty-body form - the PART 10 section 4 exception the bare div takes, and the shape the oracle emits. The tests/spec submodule pin moves to 427b125 on spec main, the merged markup-carve/carve#1241, whose corpus pins the flat bytes; all eleven 318-composite-figures documents pass byte for byte.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Aug 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.
Part of markup-carve/carve#1122; spec: markup-carve/carve#1241 (merged as
427b125).The maintainer-ruled rendering revision before any release carries the composite-figure shape: the
<div class="carve-figure-panels">wrapper is dropped. Panels and preserved stray content nest DIRECTLY inside<figure class="carve-figure-group">, one indent level up, the group<figcaption>stays last, andcarve-figure-panelstays on each panel.Rationale: HTML's content model for
figureis onefigcaptionfirst-or-last plus flow content, and afigureis itself flow content - the wrapper drew a box the element already provides, and.carve-figure-group > .carve-figure-panelselects panels exactly as the div did. Pandoc's subfigure HTML output has the same flat shape.renderFigureGroupemits the flat shape. An empty uncaptioned group keeps the bare-container empty-body form (the PART 10 §4 exception the bare div takes, matching the oracle), now pinned by a unit test; an empty captioned group holds only itsfigcaption.figure.carve-figure-panelchildren are panels, other direct children are stray content, and the direct-childfigcaptionis the group caption (a panel's caption sits inside the panel figure, so the scan cannot confuse the two).tests/specmoves to427b125(merged spec: a figure group's panels nest directly, and the wrapper div goes carve#1241), whose corpus pins the flat bytes; all eleven318-composite-figuresdocuments pass byte for byte, and the fmt corpus stays green with no exclusions.No AST, fmt, or degradation-target changes: the wrapper existed only in the HTML target, so
figure_groupon the wire, the canonical writer, and the Markdown/plain/ANSI spellings are untouched.