-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fix Normalize pages formatter not replacing dashes #7243
Conversation
src/main/java/org/jabref/logic/formatter/bibtexfields/NormalizePagesFormatter.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/logic/formatter/bibtexfields/NormalizePagesFormatter.java
Outdated
Show resolved
Hide resolved
For devCall:
|
As a follow-up to #1013, I added The discussion continued at #920 (comment) |
src/test/java/org/jabref/logic/formatter/bibtexfields/NormalizePagesFormatterTest.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/logic/formatter/casechanger/UnprotectTermsFormatter.java
Outdated
Show resolved
Hide resolved
return value; | ||
value = EM_EN_DASH_PATTERN.matcher(cleanValue).replaceAll("-") | ||
.replaceAll("[ ]*[-]+[ ]*", "--"); | ||
return unprotectTermsFormatter.format(value.trim()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also not sure if I-X
is correct or I--X
for roman page numbers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Result of test-driven-development 😇. I will think more about it now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also not sure if
I-X
is correct orI--X
for roman page numbers.
This reads more as a page range, too. Roman 9 is written IX (and not I-X), isn't it?
Regarding the case |
Fixes #7239