Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for correct sorting with other call numbers #30

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

zuphilip
Copy link
Contributor

@zuphilip zuphilip commented Oct 3, 2023

Supported schemas besides DDC, LoC are now also RVK, BK and some simple Numerus Currens call numbers. Test for all new cases are also added. See also the initial discussion in the forum https://forums.zotero.org/discussion/107358/ordering-non-standard-call-numbers where I hastely declared such schemas as non-standard (which is actually not true).

Supported schemas besides DDC, LoC are now also RVK, BK and some
simple Numerus Currens call numbers. Test for all new cases are
also added.
@@ -1030,7 +1030,7 @@ var Utilities_Item = {

let onlyNumbersRe = /^\d*$/;
let deweyRe = /^(\d{3})(?:\.(\d+))?(?:\/([a-zA-Z]{3}))?$/;
let lcWithClassificationRe = /^[a-zA-Z]{1,3}\d+($|(?=\s*[.\d]))/;
let lcWithClassificationRe = /^[a-zA-Z]{1,3}\d+($|(?=\s*(.|\s\d)))/;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the recognition and matching of patterns like "M100a", where before "M10" was recognized as the main class and the next "0" as the look-ahead here.

@dstillman dstillman merged commit 9c89b23 into zotero:master Oct 6, 2023
1 check passed
@dstillman
Copy link
Member

Thanks!

dstillman added a commit to zotero/zotero that referenced this pull request Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants