Skip to content

Commit

Permalink
We changed the abbreviation toggle within the JournalEditorViewModel.…
Browse files Browse the repository at this point in the history
…java to ignore curly braces when matching (Issue JabRef#7773).
  • Loading branch information
brapana committed Jun 8, 2021
1 parent 65a672a commit 054c936
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We reintroduced missing default keybindings for new entries. [#7346](https://github.com/JabRef/jabref/issues/7346) [#7439](https://github.com/JabRef/jabref/issues/7439)
- Lists of available fields are now sorted alphabetically. [#7716](https://github.com/JabRef/jabref/issues/7716)
- We moved the select/collapse buttons in the unlinked files dialog into a context menu. [#7383](https://github.com/JabRef/jabref/issues/7383)
- We changed the abbreviation toggle within the JournalEditorViewModel.java to ignore curly braces when matching. [#7773](https://github.com/JabRef/jabref/issues/7773)

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ public void toggleAbbreviation() {
return;
}

if (journalAbbreviationRepository.isKnownName(text.get())) {
Optional<String> nextAbbreviation = journalAbbreviationRepository.getNextAbbreviation(text.get());
// Ignore brackets when matching abbreviations.
final String name = text.get().replaceAll("[{}]", "");

if (journalAbbreviationRepository.isKnownName(name)) {
Optional<String> nextAbbreviation = journalAbbreviationRepository.getNextAbbreviation(name);

if (nextAbbreviation.isPresent()) {
text.set(nextAbbreviation.get());
Expand Down

0 comments on commit 054c936

Please sign in to comment.