Changes since v0.1.0
This book is a record of how mdbook-listings reached v0.1.0. The crate
kept moving after the book closed, so this page lists the changes that
postdate the prose. The chapters themselves are left as the v0.1.0 record
and do not describe what follows.
Unreleased — e2e suite tracks playwright-rust main
tests/e2e_callouts.rshas moved past its frozen listings. The e2e suite and the screenshot tool now build againstplaywright-rustmain rather than the releasedplaywright-rs0.14, dogfooding unreleased changes there the way this book dogfoodsmdbook-listings. On main,Page::locator()returns aLocatordirectly instead of a future, so the live test file drops the.awaitthat the chapter 5 and 6 listings show after everylocator()call. The frozene2e-callouts-v*andcapture-screenshots-v*listings stay as the v0.1.0 record.
Unreleased — List of Listings
- List of Listings index. A
{{#list-of-listings}}marker renders a book-wide index of every numbered listing, grouped by the chapter it appears in and linking to each one. Opt-in through[preprocessor.listings] list-of-listings; this book’s List of Listings page uses it.
v0.1.1 — listing numbers and captions
- Automatic listing numbers. Every listing renders a
Listing N.Mlabel, whereNis the chapter’s section number andMis the listing’s order of appearance. Numbering is opt-in through[preprocessor.listings] number-listings; this book turns it on. - Optional captions.
{{#include}}and{{#diff}}accept acaption="..."argument, rendered with the number asListing N.M — caption. - Listing-scoped callout badges. A callout badge reads as
5.3.1(its listing number plus the within-listing ordinal) rather than a bare1, both in the listing and in prose cross-references, so a badge says which listing it belongs to. - Pill-shaped badges. Badges render as pills at any width, so a bare
1and a scoped5.3.1share one shape. {{#diff}}context window. An optionalcontext=Nargument sets the unified-diff context radius (default 3), so a hunk can show enough surrounding lines to place a change. Used in Show Diffs Between Slices.
These features are active in this rendered book, but the prose, the listings, and the captured screenshots predate them: the screenshots show bare ordinals, and no chapter teaches numbering or captions. For the full entry and commit history, see the project CHANGELOG.