-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
page_Expand test sometimes updates page range delimiter, sometimes not #54
Comments
This seems to be pertinent documentation:
In this case, the |
I'm pretty sure the rationale here is that not all hyphens indicate ranges -- they can also, e.g., be part of an article number, in which case flipping them is clearly wrong. So the test assumes that if you have just numbers or you have numbers with the same prefix, that's a range, otherwise it's not. The relevant commit changing the test (which did use to be all en-dashes) also suggests that rationale. |
Okay, that makes sense. I’ll close this issue. Perhaps confusing is that some of the unchanged dashes are called “ranges” in the test. I guess that’s just how they began, prior to the commit you linked. |
P.S. I’ll be sure to check commit history on tests before opening issues from now on. 👍 |
I think we'd also take PR's with comments on tests you find confusing. Ideally it shouldn't need a 7 year-old memory of a discussion on the Zotero forums to figure out the rationale for a test ;) |
Yes, see #51 |
The expected output for page_Expand sometimes retains the original page range delimiter character (retaining a dash) and sometimes it replaces it with the locale standard (converting dash to en-dash).
So always keeping the existing delimiter doesn’t work and always replacing it doesn’t work. I can’t discern the expected logic.
It seems like the range character should always be updated to the standard when re-formatting a range. What am I missing?
The text was updated successfully, but these errors were encountered: