Skip to content

Add support for pages in the format 2:1-2:33#2440

Merged
Siedlerchr merged 3 commits into
masterfrom
tunepagesformatter
Dec 31, 2016
Merged

Add support for pages in the format 2:1-2:33#2440
Siedlerchr merged 3 commits into
masterfrom
tunepagesformatter

Conversation

@koppor

@koppor koppor commented Dec 30, 2016

Copy link
Copy Markdown
Member

This fixes JabRef#212

I worked with the article https://doi.org/10.1145/1658373.1658375 which had pages formatted as 2:1--2:33. Since I use the recommended BibTeX save actions, these pages got destroyed. This PR fixes that.

  • Change in CHANGELOG.md described
  • Tests created for changes
  • [n/a] Screenshots added (for bigger UI changes)
  • Manually tested changed features in running JabRef
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)
  • [n/a] If you changed the localization: Did you run gradle localizationUpdate?

@koppor koppor added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Dec 30, 2016
@Siedlerchr

Copy link
Copy Markdown
Member

Are These valid für

@Siedlerchr Siedlerchr closed this Dec 30, 2016
@Siedlerchr Siedlerchr reopened this Dec 30, 2016
@Siedlerchr

Copy link
Copy Markdown
Member

Sorry, was on my mobile.
Codewise LGTM

if (matcher.matches()) {
// replace
if(Strings.isNullOrEmpty(matcher.group(2))) {
if (Strings.isNullOrEmpty(matcher.group(3))) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not use named groups? Would replace the magic numbers.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done. Hope this is now ready as late self-birthday-present. 🎉

@koppor

koppor commented Dec 31, 2016

Copy link
Copy Markdown
Member Author

To fix codacy, I removed the expectCorrect method and also ensured that there is one assert per test.

@Siedlerchr Siedlerchr merged commit b1e482b into master Dec 31, 2016
@Siedlerchr Siedlerchr deleted the tunepagesformatter branch December 31, 2016 14:01
Siedlerchr added a commit that referenced this pull request Jan 13, 2017
* upstream/master: (67 commits)
  Medline fix test (#2463)
  Fix conversion of tilde n (#2459)
  ctrl+f selects current query while the searchbar is focusd (#2457)
  incorrect log name of JabRefExecutorService (#2452)
  unregister DateChangeListener in manual update method (#2450)
  Escaping of escape symbols in the MetaData (#2445)
  Fix typo
  Update gradle from 3.2.1 to 3.3
  Use instanceof
  Remove unused import
  Avoid ClassCastException in AutoCompleteListener
  Fix typo in CHANGELOG.md
  Add support for pages in the format 2:1-2:33 (#2440)
  L10N-ru update (#2441)
  Change https to http
  Update DBLP API endpoint
  Revert "Chistmas edition colors"
  Show development information
  Release v3.8.1
  Result of generate-authors.sh
  ...

# Conflicts:
#	CHANGELOG.md
#	src/main/java/net/sf/jabref/gui/date/DatePickerButton.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Normalize page numbers should ignore invalid pages

3 participants