Repository navigation
Give OSCOLA its own short form and work out note positions - #326
Conversation
Note citations, PR 1 of the #243 build (plan tickets N2.4 and N2.3). Cite gave OSCOLA the Chicago short note. OSCOLA now gets its own form, "Hart 135": surname, pinpoint after a space with no comma or "p.", OSCOLA's name joining, cases by italic name, Acts and instruments by title and year with a comma before the section. With a first-note number it carries OSCOLA 5's cross-reference, "Hart (n 1) 140". styles.json gains an optional `shortForm` key ("oscola"), read by getShortFormKind(). Update citations counts the old Chicago form and the new OSCOLA form as generated, but a bare surname only in an OSCOLA bibliography, and never recovers a legacy locator from the OSCOLA form. src/lib/note-positions.js works out first, subsequent, and (opt-in) ibid. positions in note order, with the number of each work's first note, ready for footnote citations. The Playground OSCOLA example adds a paragraph citing four sources, and a demo test checks every demo citation is in its current short form. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WPtgA26bGmxnWFaShGz2hk
Plugin readme previewOpen preview · Commit 37 passed · 0 warnings · 0 notes Passed checks (37)
Readme and PHP-header checks only; this does not test plugin runtime compatibility. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WPtgA26bGmxnWFaShGz2hk
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #326 +/- ##
============================================
- Coverage 87.41% 87.30% -0.12%
Complexity 67 67
============================================
Files 113 114 +1
Lines 12807 12875 +68
Branches 1348 1373 +25
============================================
+ Hits 11195 11240 +45
Misses 489 489
- Partials 1123 1146 +23 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Independent post-merge reviewI read the merged diff fresh ( Three things the next PRs (footnote insertion, PR 3) must handle, ranked:
Nits: No regex HTML parsing was added here. Generated by Claude Code |
Requested by Dan · project thread
Summary
PR 1 of the note citations build for #243, following
docs/planning/note-citations-plan.md(tickets N2.4 and N2.3). Later PRs: 2, the Chicago and OSCOLA<citation>layouts and the/formatlayoutparameter (N2.1, N2.2); 3, Cite as a core footnote and Update citations over thefootnotesmeta (N2.5 to N2.7); 4, write routes, CLI, and the Chicago ibid. option (Phase 3).What changed
Hart, *The Concept of Law*, 135). OSCOLA now getsHart 135. The pinpoint goes after a space, with no comma, and a leadingp./pp.is dropped. Names are joined OSCOLA's way:A and B,A, B and C, andA and othersfor more than three. A case is cited by its italic name, usingtitle-shortwhen the record has one. An Act or instrument is cited by its title and year, with a comma before the section:Human Rights Act 1998, s 6. Given a first-note number, the form adds OSCOLA 5's(n 1), but never for legislation or treaties.includes/styles.jsongains an optionalshortFormkey ("oscola"), read by the newgetShortFormKind().StyleDataTestallows it and checks it.src/lib/note-positions.jsworks out first, subsequent, and opt-in ibid. positions in note order, along with each work's first-note number. It is pure and unused until PR 3, so a PHP port can share its fixtures.src/playground-demo.test.jschecks that every demo citation is in its current short form.Why: the plan makes OSCOLA's own short form a prerequisite for OSCOLA notes, and the Stage 1 form was wrong for OSCOLA in the text as well.
save()is unchanged, so no deprecation is involved.Validation
npm run lint:jspassesnpm run lint:css: no CSS changednpm run lint:i18n: no source strings changednpm run testpasses (1,741 tests);npm run typecheck:jsandnpm run format:checkpassnpm run buildsucceedscomposer lint:phppassChecklist
Generated by Claude Code