Skip to content

Commit

Permalink
Fix for the issue #4912 (#4916)
Browse files Browse the repository at this point in the history
* Fix for the issue #4912

Apostrophe character removed from KEY_ILLEGAL_CHARACTERS in BibtexKeyGenerator

* Add special character to KEY_ILLEGAL_CHARACTERS

ʹ added to KEY_ILLEGAL_CHARACTERS and an assertion has been added in testMakeLabelAndCheckLegalKeysAccentGrave
  • Loading branch information
znuznu authored and Siedlerchr committed Apr 24, 2019
1 parent 251c44d commit aab77a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class BibtexKeyGenerator extends BracketedPattern {
*/
public static final String APPENDIX_CHARACTERS = "abcdefghijklmnopqrstuvwxyz";
private static final Logger LOGGER = LoggerFactory.getLogger(BibtexKeyGenerator.class);
private static final String KEY_ILLEGAL_CHARACTERS = "{}(),\\\"-#~^':`";
private static final String KEY_ILLEGAL_CHARACTERS = "{}(),\\\"-#~^:'`ʹ";
private static final String KEY_UNWANTED_CHARACTERS = "{}(),\\\"-";
private final AbstractBibtexKeyPattern citeKeyPattern;
private final BibDatabase database;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@ public void testMakeLabelAndCheckLegalKeysAccentGrave() throws ParseException {
assertEquals("DAl",
BibtexKeyGenerator.cleanKey(BibtexKeyGenerator.generateKey(entry0.get(), "auth3",
new BibDatabase()), true));

entry0 = BibtexParser.singleFromString("@ARTICLE{kohn, author={Andrés Aʹrnold}, year={2000}}",
importFormatPreferences, fileMonitor);
assertEquals("Arn",
BibtexKeyGenerator.cleanKey(BibtexKeyGenerator.generateKey(entry0.get(), "auth3",
new BibDatabase()), true));
}

/**
Expand Down

0 comments on commit aab77a1

Please sign in to comment.