Repository navigation
fix(docs): render fenced code at the end of a document - #969
rudycelekli wants to merge 2 commits into
Conversation
Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
PR SummaryLow Risk Overview After the markdown line loop finishes, any open fence is now flushed through the same Tests: adds Reviewed by Cursor Bugbot for commit a36fc6b. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Codex review: needs maintainer review before merge. Reviewed October 5, 2026, 11:30 AM ET / 15:30 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR preserves fenced code at document EOF, adds rendering and HTML-escaping regression tests, and includes them in the docs test suite. Merge readiness✅ Ready for maintainer review The fix remains necessary: current main and v4.8.0 still discard code from an unclosed fence. The patch is focused, has relevant production proof, and introduces no actionable correctness findings. Priority: P2 Review scores
Verification
How this fits togetherPeekaboo’s documentation builder converts repository Markdown into HTML published through GitHub Pages. Its fence parser sends captured code through syntax highlighting before emitting a code block. flowchart TD
A[Markdown documents] --> B[Documentation builder]
B --> C[Collect fenced code]
C --> D[Closing fence or document end]
D --> E[Highlight and escape code]
E --> F[Generated HTML pages]
F --> G[GitHub Pages]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep the EOF flush on the existing highlighting path and retain explicit-closure and literal-HTML controls. Do we have a high-confidence way to reproduce the issue? Yes: current-main source clearly drops a pending fence at EOF, and the contributor supplies before/after output from the actual builder with that fixture. This read-only review did not execute it. Is this the best way to solve the issue? Yes: flushing the captured code through the existing explicit-closure rendering path is a narrow repair that preserves highlighting and escaping. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 91cd87e79bf0. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
|
The owner consolidation is #992, combining the five related rendering repairs after independently reproducing them on current main. Its 24 renderer tests, metadata tests, lint, full site build, and P0–P2 review pass. It also includes actual Chrome before/after screenshots using identical synthetic input. This original will be closed as superseded once the combined candidate completes CI and lands; contributor credit is retained. |
|
Thanks for reporting the dropped final fence. Main reproduces it, and owner PR #992 includes the EOF flush with rendering regressions. Closing this duplicate in favor of the consolidated pending fix. |
Consolidate the reproduced CRLF metadata, entity/link, heading identity, EOF fence, and highlighter token defects from #939, #931, #940, #969, and #971. Keep highlighted fragments separate from source text and retain the shared renderer gate. Reconcile the Unreleased note and menu-preparation documentation with current main. All 25 docs-site regressions pass; independent Codex review is clean through P2. Co-authored-by: Rudy Mizrahi Celekli <47457359+rudycelekli@users.noreply.github.com>
Documentation rendering lost literal code text, leaked CRLF front matter into articles, double-escaped TOC text and link queries, reused heading anchors, and discarded fenced code at EOF. This consolidates the verified fixes from #939, #931, #940, #969 and #971, with credit to @rudycelekli. The highlighter now keeps rendered fragments separate from source text, with no reserved source characters or 6,400-token limit. The page-wide heading allocator preserves natural anchors and assigns unique duplicate/fallback IDs. Front matter is normalized before extraction; renderer-owned entities are decoded once; link suffixes remain intact; EOF flushes the pending fence. Normal macOS CI now runs the complete shared renderer gate. Preserve the existing regression and platform proof from the PR. Reconcile with current main and retain the Unreleased changelog. Independent Codex review is clean through P2, and the final exact-head CI checks pass. Co-authored-by: Rudy Mizrahi Celekli <47457359+rudycelekli@users.noreply.github.com>
Summary
The docs builder accumulated fenced code until an explicit closing fence. If the document ended first, it discarded every captured code line and still reported a successful build.
Flush the pending fence at EOF using the existing syntax highlighter. Markdown permits the document end to close a fenced block; see CommonMark fenced code rules. Add EOF and explicitly closed controls, and include the new regression in test:docs-site/test:safe.
Observed production behavior
Actual builder entrypoint, owned Markdown fixture only. The shipped docs tree was also built without source changes.
Validation
node --test tests/docs-site-eof-fence.test.mjs tests/docs-site-toc.test.mjs— four tests passed.node scripts/build-docs-site.mjs— passed; 70 HTML pages emitted.git diff --check— passed.AI assistance
Prepared with Codex assistance; reproducible commands and captured production output are included above.