Dev - #15
Merged
Merged
Dev#15
Conversation
`.task-list-item { display: flex }` promoted every inline child of a
checklist item to a flex item, so bold runs and inline code each became
their own column; `word-break: break-word` on inline code then let those
items shrink to min-content — one character wide. Replaced with normal
inline flow and a hanging checkbox (negative margin-inline-start), which
also fixes nested checklists rendering as sibling columns, plain bullets
losing their markers beside task items, ordered checklists losing their
numbering (a flex item is not a list-item, so the counter never
advanced), block children sitting beside the checkbox, and long URLs
running off the page.
Code blocks:
- `pre { overflow-x: auto }` made every block a scroll container, which
is monolithic under CSS fragmentation — so `break-inside` was ignored
and a tall block could never split, it was pushed whole to the next
page and then clipped. Removed, and lines now wrap (`pre-wrap`) with
continuations hanging past the line-number gutter, so nothing is cut
off at the right margin.
- Splitting exposed a Paged.js defect that blanks the line straddling a
page edge, so the export instead cuts long listings into page-sized
atomic pieces (chunkCodeBlocks) that join seamlessly; Paged.js only
ever places whole blocks.
Tables: type and padding step down at 6+ and 8+ columns, and only long
tokens and URLs may break, so headers stay whole rather than reading
"Platfor / m". Also gives callout bodies `min-width: 0` and lets links
break anywhere, so neither overflows the page box.
Stops two leaks into exported files: the Copy button was printed into
every PDF, and every checkbox carried `node="[object Object]"` into the
preview DOM, the standalone HTML export and the PDF.
Verified by rendering checklist, wide-table, deep-nesting and RTL Arabic
fixtures through the real pipeline and Paged.js in headless Chrome: no
element extends past the page content box and the code-line sequence
matches the source exactly.
…rness Adds author control over pagination and closes the remaining ways content could be silently clipped in a PDF. Directives (remarkPageDirectives): - ::page-break starts the next block on a fresh page - :::keep-together never splits a run across a page boundary - :::landscape puts a run on its own rotated page, via a named @page sized from the configured paper Content that cannot reflow: - fitToPage runs after pagination and scales down anything still wider than its page — display math, diagrams, ASCII figures, code. Reduces type size rather than applying a transform, so the element's box shrinks too; a transform would leave the original height as a gap. Shrinking only frees vertical space, so the laid-out pages stay valid. This closes the KaTeX clipping bug: .katex-display had the same overflow-x scroll-container trap that hid the code-block bug. - Tables past 10 columns stack into one labelled block per row (stackWideTables); the header text has to be copied onto the body cells as an attribute because CSS cannot reach across rows. - renderPagedPreview returns fit: { scaled, clipped } so the UI can warn when something was still too wide at the minimum scale. Export transforms now live behind prepareForPaging, so the regression suite runs exactly what the export runs rather than a copy that can drift. The standalone HTML export inlined KaTeX CSS instead of linking a CDN: if that CDN was unreachable, .katex-mathml stopped being hidden and every equation rendered twice, once typeset and once as raw MathML. The Word export gains the same stylesheet, so math survives there too. tests/visual renders fixtures through the real pipeline and paginator and asserts no element leaves the page content box, the rendered code-line sequence matches the source, and no line is blank where the source has content. Opt-in for now (SCRIPTO_VISUAL=1) — headless Chrome's --dump-dom races Paged.js's async layout under a virtual time budget. Two findings are captured in docs/RENDERING_AUDIT.md: Paged.js preloads every @font-face and stalls silently when one cannot load, and PagedConfig before/after are the supported hooks.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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
Type of Change
feat— new featurefix— bug fixdocs— documentation onlyrefactor— code change that neither fixes a bug nor adds a featurechore— tooling / maintenancetest— adding or updating testsperf— performance improvementci— CI / build changesScreenshots
Checklist
npm run typecheckpassesnpm run lintpassesnpm run buildpassesany, immutable updates, logical CSS)console.log(uses@/lib/logger)