Repository navigation
Put each code fold inside its language tab - #34
Conversation
Quarto hoists a figure's code folds above the figure, so R and Python folds stacked outside the tabset. A small after-body script moves each fold into the tab for its language, and the fold label no longer says R. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019xfc9pT9FcXoVbp61GC7NJ
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The slide tabsets use tabby markup, so the script now selects panes and tabs without Bootstrap class names, and a fold with no language match takes the first unused tab. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019xfc9pT9FcXoVbp61GC7NJ
|
Claude finished review — View run Commit Findings
I couldn't confirm either way without a render. Before relying on the claim in the comment on line 7, render one slide deck and inspect the tabset DOM. If the panes are direct children, use a selector that matches both layouts. For example, take
Checked
VerdictReady for merge. Nothing here blocks the merge. The line 11 selector is worth a render check, though. Structured Review Data (JSON){
"schema_version": "1.1",
"reviewer": "claude",
"commit_sha": "a6262ed4a7a5d2028be598d222f2a4bb9ff6a287",
"verdict": "CLEAN",
"findings": [],
"detailed_assessment": "In tabset-code-in-tabs.html the slide pane selector may not match tabby's DOM, which would make the script a silent no-op on slides; unverified, and the unused() helper can return -1 only if the length guards are relaxed.",
"holistic_assessment": "The change is small and scoped, the include-after-body wiring for revealjs is correct, and no page paths or anchors change; validation was by reading only because Quarto was unavailable to render."
}Reviewed commit: a6262ed |
2026-10-31 00:28 UTC |
Requested by Ezra · project thread
Quarto hoists a cross-referenced figure's
details.code-foldblocks above the figure, so the R and Python folds stacked outside the tabset (example: https://morrison-lab.github.io/mds/optimization-convexity.html#fig-convex-set).This adds
tabset-code-in-tabs.html, an after-body script that moves each fold into the tab for its language, matching by language and falling back to order. It skips a tabset unless the folds before it equal its tab count..gitignoregets an exception for the new file. The fold labels here already say "Show code".Checked with jsdom on the published mds page; the PR preview should confirm it in a real render.
Generated by Claude Code