Repository navigation
Fix misplaced anchors for remark and proof-like divs - #180
Conversation
Port div-anchors extension fix from Morrison-Lab/qwt#160 (Morrison-Lab/qwt#159). Quarto theorem environments render titles with class .theorem-title, while proof-like environments (proof, remark, solution) render titles with class .proof-title. Previously, div-anchors.js only queried .theorem-title when relocating AnchorJS anchor links inline, causing remark and other proof-like divs to leave the anchor link at the bottom of the div rather than next to the title. - Support .proof-title alongside .theorem-title in div-anchors.js - Trim trailing whitespace from .proof-title (which ends with '. ') so the non-breaking separator and anchor stay attached to the title, and ensure a space separates the anchor from subsequent body content - Add 'rem' and 'sol' aliases and crossref ID prefix matching (rem-, thm-, def-, etc.) to is_theorem_div in both Lua and JS
|
Claude finished review — View run The diff is small and limited to the two files I already reviewed in full — nothing else is touched. This confirms the review is complete. Summary of findings: none. The PR ports a fix verbatim (byte-for-byte identical diff, confirmed via VerdictReady for merge Structured Review Data (JSON){
"schema_version": "1.1",
"reviewer": "claude",
"commit_sha": "da87d6bc01aaad4d4509f3e92a664d0293b14742",
"verdict": "CLEAN",
"findings": [],
"detailed_assessment": "Checked _extensions/div-anchors/div-anchors.js and div-anchors.lua line by line; the diff is byte-identical to the already-merged upstream Morrison-Lab/qwt#160 fix, with no divergence or regression introduced during the port.",
"holistic_assessment": "Scope stays confined to the vendored anchor-placement extension, matches the described bug (rem-/sol- prefixed divs like rem-zero-vector-identity exist throughout chapters), and carries no build-artifact or CI surface risk."
}Reviewed commit: da87d6b |
|
Port div-anchors extension fix from Morrison-Lab/qwt#160 (Morrison-Lab/qwt#159).
Problem
Quarto theorem environments render titles with class
.theorem-title, while proof-like environments (proof,remark,solution) render titles with class.proof-title. Previously,div-anchors.jsonly queried.theorem-titlewhen relocating AnchorJS anchor links inline, causing remark and other proof-like divs to leave the anchor link at the bottom of the div rather than next to the title (for example, atlinear-algebra.html#rem-zero-vector-identity).Solution
.proof-titlealongside.theorem-titleindiv-anchors.js.div-anchors.js, trim trailing whitespace from.proof-title(which ends with'. ') so the non-breaking separator and anchor stay attached to the title, and ensure a trailing space separates the anchor from subsequent body content if not already spaced.remandsolaliases and crossref ID prefix matching (rem-,thm-,def-, etc.) tois_theorem_divin both Lua and JS.