Repository navigation
Sort names with particles per each style's demote setting - #147
Merged
Merged
Conversation
A surname opening with a lowercase particle (van, de la, von, d') sorted under the particle in every style. Chicago and Vancouver demote the particle, so they now sort by the surname proper, and the formatter splits the particle out for display-and-sort styles so citeproc-php renders "Duijnhoven, Elza van". Other styles keep the particle in front. Names are stored as entered; the particle is inferred at sort and format time. save() order changes, so a new deprecation freezes the pre-1.12.0 shape, and the PHP save port, parity fixtures, and sort-coordination cases are updated to match. Closes #142 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KbVuMPN7YTcV27vwsG3LZ2
4 tasks done
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #147 +/- ##
============================================
+ Coverage 87.87% 87.88% +0.01%
Complexity 22 22
============================================
Files 59 60 +1
Lines 6952 7060 +108
Branches 678 690 +12
============================================
+ Hits 6109 6205 +96
Misses 292 292
- Partials 551 563 +12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Closes #142. Before this change, a surname opening with a lowercase particle ("van Duijnhoven", "de la Cruz", "von Neumann", "d'Alembert") sorted under the particle in every style.
Now each bundled style's
demote-non-dropping-particlesetting decides:No data-shape change. Names stay stored as entered, and the particle is worked out at sort and format time. BibTeX/RIS export, JSON-LD, COinS, Edit fields and dedup are unchanged.
New code:
src/lib/name-particles.jsholds the shared particle rules.demoteNonDroppingParticle.particleAwareSortoption.includes/save-markup.phpmirrors all of it.Compatibility.
save()order changes, so a newdeprecated[0]freezes the pre-1.12.0 shape. Existing posts stay valid and take the new order the next time they are saved. The formatter cache key is bumped to version 3.Validation
npm run lint:js,lint:css,lint:i18n: passcomposer lint:php,composer analyze:php: passname-particles.test.js, including a check that each registry entry matches its bundled CSL file;sort_familyandprepare_csl_for_formatter.SortCoordinationTestnow prepares items the way the formatter does.collation-mix,mla-repeated-authors) were regenerated from the PHP port, and JS parity is 20/20.npm run buildandnpm run package:releasesucceed.composer verify:metricspasses, with the metrics doc updated.Checklist
[Unreleased]entry🤖 Generated with Claude Code
https://claude.ai/code/session_01KbVuMPN7YTcV27vwsG3LZ2
Generated by Claude Code