Repository navigation
Spec 001 T028: the book's contents, second pass - #151
Closed
adamjohnwright wants to merge 2 commits into
Closed
adamjohnwright wants to merge 2 commits into
adamjohnwright wants to merge 2 commits into
Conversation
…gain reprintFront reads each probe's page in the joined PDF, prints the front part again with the numbers and swaps its pages in before the links are rewritten and the pages stamped, deleting what only the first print held. A reprint whose pages or front headings move is refused. From #148's review: the stamp-twice guard is held before the first await; marginText collapses only CSS's collapsible white space; a name leaving no header is refused; the join measurement embeds Roboto's WOFF file; T027's note corrected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Replaced after review: marginText let undrawable space characters through, refusing the PDF at stamping. |
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.
Spec 001, task T028.
What:
reprintFront(src/print/contents.ts): after a PDF's parts are joined, each contents entry's target page is read from its probe (counted from the PDF's first page, as the stamps count); the front part is laid out again with those numbers, printed, and swapped in for the first print's pages, before T026's links and T027's stamps run, so its links and stamps are done like the rest. The objects only the old front pages held are deleted (pdf-lib'sremovePagedeletes the page alone). It refuses, unchanged, if the reprint's page count or a front heading's page differs, if a target has no probe, if an anchor is probed twice, or if the parts don't make the PDF. T029's task text now gives the order injoined:reprintFront,rewriteLinks,writeOutline,stampPages.From #148's review (T027's lows): the stamp-twice guard is set before the first
await(two at once now refused);marginTextcollapses only[ \t\n\r\f], keeping NBSP, thin and ideographic spaces as a margin box nearly does; an empty header is refused;ci/measure/join.tsembeds the WOFF1 file; T027's note corrected.Tests:
test/print/contents.test.ts(7) and new stamp tests; 330 in all. Mutants in tasks.md.🤖 Generated with Claude Code