-
-
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: bibkey generated does not handle diacritics #4713
Conversation
Thanks for your contribution. Unfortunately your changes resulted in a lot of failed tests (look at Details of the travis build and then select the failing job) |
Noted. Is there another approach to handle this? |
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.
It should suffice to add the cleankey
statement here: https://github.com/JabRef/jabref/pull/4713/files#diff-fee188bf55aacff33f887a63d6b72605R234
(and also remove other symbols such as -
and whitespace).
Please also create a few tests in https://github.com/JabRef/jabref/pull/4713/files#diff-fee188bf55aacff33f887a63d6b72605R234. Thanks!
@chelseyong Try merging the current master in e.g. (if upstream is the jabref/jabref repo)
I'm not an intellij user, but executing gradle should be sufficient. |
Sorry for the delay, I had some software issues. Symbol |
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.
Looks good to me. Thanks for your contribution!
@@ -72,15 +72,15 @@ private static String getAppendix(int number) { | |||
} | |||
} | |||
|
|||
public static String cleanKey(String key, boolean enforceLegalKey) { | |||
public static String filterUnwantedCharacters(String key, boolean enforceLegalKey) { |
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.
maybe a slightly better name removeUnwantedCharacters
(filter would imply that the unwanted characters are returned).
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.
Thank you very much for your contribution!
lgtm
@@ -26,8 +26,8 @@ | |||
*/ | |||
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_UNWANTED_CHARACTERS = "{}(),\\\""; | |||
private static final String KEY_ILLEGAL_CHARACTERS = "{}(),\\\"-#~^':`"; |
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.
@chelseyong Do you, by chance, remember why you introduced -
here? We have issues with that. See #6295 for details.
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 think it is due to a suggestion made in the issue.
Al-Ketan, 2019 -> Al-19 (dash in bibtex key is awkward, should probably be ignored in favor of the next letter and become AlK19)
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.
Thank you for your reply. I Think, there was some misunderstanding at #4709 (comment)
Well, dash is a perfectly legal char
We will fix it at #6300
143464e Fix comma before et al. for the-oncologist.csl (#4724) 3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (#4719) b2c0c1e APA: in-text title in title-case (#4725) 88c68d2 Fix et-al and indetation settings for mammalia.csl (#4717) 05940a2 Update the-febs-journal.csl (#4720) 1d77ba8 Request for review and assessment of the repa.csl (#4698) 76b4be5 Update isnad.csl (#4716) f709c84 Update isnad-dipnotlu.csl (#4715) 45d7655 Create mammalia.csl (#4714) eb333ca Update society-for-american-archaeology.csl (#4710) d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (#4712) 5e34eb1 Update animal-welfare.csl (#4713) 06785fa Update le-tapuscrit-author-date.csl (#4708) ada5282 Update norois.csl (#4707) git-subtree-dir: src/main/resources/csl-styles git-subtree-split: 143464e
143464e Fix comma before et al. for the-oncologist.csl (JabRef#4724) 3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (JabRef#4719) b2c0c1e APA: in-text title in title-case (JabRef#4725) 88c68d2 Fix et-al and indetation settings for mammalia.csl (JabRef#4717) 05940a2 Update the-febs-journal.csl (JabRef#4720) 1d77ba8 Request for review and assessment of the repa.csl (JabRef#4698) 76b4be5 Update isnad.csl (JabRef#4716) f709c84 Update isnad-dipnotlu.csl (JabRef#4715) 45d7655 Create mammalia.csl (JabRef#4714) eb333ca Update society-for-american-archaeology.csl (JabRef#4710) d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (JabRef#4712) 5e34eb1 Update animal-welfare.csl (JabRef#4713) 06785fa Update le-tapuscrit-author-date.csl (JabRef#4708) ada5282 Update norois.csl (JabRef#4707) git-subtree-dir: src/main/resources/csl-styles git-subtree-split: 143464e
906cd6d Create technische-universitat-dresden-linguistik-author-date (JabRef#4730) 607a056 Create ifao-publications.csl (JabRef#4731) 5a65f50 remove et-al settings for bibliography for PVS (JabRef#4735) 4a145d4 Create current-opinion-in-endocrinology-diabetes-and-obesity.csl (JabRef#4734) d70c2a4 Add chapter section in bibliography (JabRef#4732) 366dbc1 Create economic-history-review.csl (JabRef#4643) 7069ddc Create the-open-university-harvard-s390-modules.csl (JabRef#4711) a789973 Chicago: Uppercase "Presentated at" if no `genre` (JabRef#4729) 143464e Fix comma before et al. for the-oncologist.csl (JabRef#4724) 3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (JabRef#4719) b2c0c1e APA: in-text title in title-case (JabRef#4725) 88c68d2 Fix et-al and indetation settings for mammalia.csl (JabRef#4717) 05940a2 Update the-febs-journal.csl (JabRef#4720) 1d77ba8 Request for review and assessment of the repa.csl (JabRef#4698) 76b4be5 Update isnad.csl (JabRef#4716) f709c84 Update isnad-dipnotlu.csl (JabRef#4715) 45d7655 Create mammalia.csl (JabRef#4714) eb333ca Update society-for-american-archaeology.csl (JabRef#4710) d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (JabRef#4712) 5e34eb1 Update animal-welfare.csl (JabRef#4713) 06785fa Update le-tapuscrit-author-date.csl (JabRef#4708) ada5282 Update norois.csl (JabRef#4707) git-subtree-dir: src/main/resources/csl-styles git-subtree-split: 906cd6d
906cd6d Create technische-universitat-dresden-linguistik-author-date (JabRef#4730) 607a056 Create ifao-publications.csl (JabRef#4731) 5a65f50 remove et-al settings for bibliography for PVS (JabRef#4735) 4a145d4 Create current-opinion-in-endocrinology-diabetes-and-obesity.csl (JabRef#4734) d70c2a4 Add chapter section in bibliography (JabRef#4732) 366dbc1 Create economic-history-review.csl (JabRef#4643) 7069ddc Create the-open-university-harvard-s390-modules.csl (JabRef#4711) a789973 Chicago: Uppercase "Presentated at" if no `genre` (JabRef#4729) 143464e Fix comma before et al. for the-oncologist.csl (JabRef#4724) 3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (JabRef#4719) b2c0c1e APA: in-text title in title-case (JabRef#4725) 88c68d2 Fix et-al and indetation settings for mammalia.csl (JabRef#4717) 05940a2 Update the-febs-journal.csl (JabRef#4720) 1d77ba8 Request for review and assessment of the repa.csl (JabRef#4698) 76b4be5 Update isnad.csl (JabRef#4716) f709c84 Update isnad-dipnotlu.csl (JabRef#4715) 45d7655 Create mammalia.csl (JabRef#4714) eb333ca Update society-for-american-archaeology.csl (JabRef#4710) d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (JabRef#4712) 5e34eb1 Update animal-welfare.csl (JabRef#4713) 06785fa Update le-tapuscrit-author-date.csl (JabRef#4708) ada5282 Update norois.csl (JabRef#4707) git-subtree-dir: src/main/resources/csl-styles git-subtree-split: 906cd6d
906cd6d Create technische-universitat-dresden-linguistik-author-date (JabRef#4730) 607a056 Create ifao-publications.csl (JabRef#4731) 5a65f50 remove et-al settings for bibliography for PVS (JabRef#4735) 4a145d4 Create current-opinion-in-endocrinology-diabetes-and-obesity.csl (JabRef#4734) d70c2a4 Add chapter section in bibliography (JabRef#4732) 366dbc1 Create economic-history-review.csl (JabRef#4643) 7069ddc Create the-open-university-harvard-s390-modules.csl (JabRef#4711) a789973 Chicago: Uppercase "Presentated at" if no `genre` (JabRef#4729) 143464e Fix comma before et al. for the-oncologist.csl (JabRef#4724) 3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (JabRef#4719) b2c0c1e APA: in-text title in title-case (JabRef#4725) 88c68d2 Fix et-al and indetation settings for mammalia.csl (JabRef#4717) 05940a2 Update the-febs-journal.csl (JabRef#4720) 1d77ba8 Request for review and assessment of the repa.csl (JabRef#4698) 76b4be5 Update isnad.csl (JabRef#4716) f709c84 Update isnad-dipnotlu.csl (JabRef#4715) 45d7655 Create mammalia.csl (JabRef#4714) eb333ca Update society-for-american-archaeology.csl (JabRef#4710) d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (JabRef#4712) 5e34eb1 Update animal-welfare.csl (JabRef#4713) 06785fa Update le-tapuscrit-author-date.csl (JabRef#4708) ada5282 Update norois.csl (JabRef#4707) git-subtree-dir: src/main/resources/csl-styles git-subtree-split: 906cd6d
906cd6d Create technische-universitat-dresden-linguistik-author-date (JabRef#4730) 607a056 Create ifao-publications.csl (JabRef#4731) 5a65f50 remove et-al settings for bibliography for PVS (JabRef#4735) 4a145d4 Create current-opinion-in-endocrinology-diabetes-and-obesity.csl (JabRef#4734) d70c2a4 Add chapter section in bibliography (JabRef#4732) 366dbc1 Create economic-history-review.csl (JabRef#4643) 7069ddc Create the-open-university-harvard-s390-modules.csl (JabRef#4711) a789973 Chicago: Uppercase "Presentated at" if no `genre` (JabRef#4729) 143464e Fix comma before et al. for the-oncologist.csl (JabRef#4724) 3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (JabRef#4719) b2c0c1e APA: in-text title in title-case (JabRef#4725) 88c68d2 Fix et-al and indetation settings for mammalia.csl (JabRef#4717) 05940a2 Update the-febs-journal.csl (JabRef#4720) 1d77ba8 Request for review and assessment of the repa.csl (JabRef#4698) 76b4be5 Update isnad.csl (JabRef#4716) f709c84 Update isnad-dipnotlu.csl (JabRef#4715) 45d7655 Create mammalia.csl (JabRef#4714) eb333ca Update society-for-american-archaeology.csl (JabRef#4710) d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (JabRef#4712) 5e34eb1 Update animal-welfare.csl (JabRef#4713) git-subtree-dir: src/main/resources/csl-styles git-subtree-split: 906cd6d
906cd6d Create technische-universitat-dresden-linguistik-author-date (JabRef#4730) 607a056 Create ifao-publications.csl (JabRef#4731) 5a65f50 remove et-al settings for bibliography for PVS (JabRef#4735) 4a145d4 Create current-opinion-in-endocrinology-diabetes-and-obesity.csl (JabRef#4734) d70c2a4 Add chapter section in bibliography (JabRef#4732) 366dbc1 Create economic-history-review.csl (JabRef#4643) 7069ddc Create the-open-university-harvard-s390-modules.csl (JabRef#4711) a789973 Chicago: Uppercase "Presentated at" if no `genre` (JabRef#4729) 143464e Fix comma before et al. for the-oncologist.csl (JabRef#4724) 3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (JabRef#4719) b2c0c1e APA: in-text title in title-case (JabRef#4725) 88c68d2 Fix et-al and indetation settings for mammalia.csl (JabRef#4717) 05940a2 Update the-febs-journal.csl (JabRef#4720) 1d77ba8 Request for review and assessment of the repa.csl (JabRef#4698) 76b4be5 Update isnad.csl (JabRef#4716) f709c84 Update isnad-dipnotlu.csl (JabRef#4715) 45d7655 Create mammalia.csl (JabRef#4714) eb333ca Update society-for-american-archaeology.csl (JabRef#4710) d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (JabRef#4712) 5e34eb1 Update animal-welfare.csl (JabRef#4713) 06785fa Update le-tapuscrit-author-date.csl (JabRef#4708) ada5282 Update norois.csl (JabRef#4707) git-subtree-dir: src/main/resources/csl-styles git-subtree-split: 906cd6d
906cd6d Create technische-universitat-dresden-linguistik-author-date (JabRef#4730) 607a056 Create ifao-publications.csl (JabRef#4731) 5a65f50 remove et-al settings for bibliography for PVS (JabRef#4735) 4a145d4 Create current-opinion-in-endocrinology-diabetes-and-obesity.csl (JabRef#4734) d70c2a4 Add chapter section in bibliography (JabRef#4732) 366dbc1 Create economic-history-review.csl (JabRef#4643) 7069ddc Create the-open-university-harvard-s390-modules.csl (JabRef#4711) a789973 Chicago: Uppercase "Presentated at" if no `genre` (JabRef#4729) 143464e Fix comma before et al. for the-oncologist.csl (JabRef#4724) 3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (JabRef#4719) b2c0c1e APA: in-text title in title-case (JabRef#4725) 88c68d2 Fix et-al and indetation settings for mammalia.csl (JabRef#4717) 05940a2 Update the-febs-journal.csl (JabRef#4720) 1d77ba8 Request for review and assessment of the repa.csl (JabRef#4698) 76b4be5 Update isnad.csl (JabRef#4716) f709c84 Update isnad-dipnotlu.csl (JabRef#4715) 45d7655 Create mammalia.csl (JabRef#4714) eb333ca Update society-for-american-archaeology.csl (JabRef#4710) d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (JabRef#4712) 5e34eb1 Update animal-welfare.csl (JabRef#4713) 06785fa Update le-tapuscrit-author-date.csl (JabRef#4708) ada5282 Update norois.csl (JabRef#4707) git-subtree-dir: src/main/resources/csl-styles git-subtree-split: 906cd6d
906cd6d Create technische-universitat-dresden-linguistik-author-date (JabRef#4730) 607a056 Create ifao-publications.csl (JabRef#4731) 5a65f50 remove et-al settings for bibliography for PVS (JabRef#4735) 4a145d4 Create current-opinion-in-endocrinology-diabetes-and-obesity.csl (JabRef#4734) d70c2a4 Add chapter section in bibliography (JabRef#4732) 366dbc1 Create economic-history-review.csl (JabRef#4643) 7069ddc Create the-open-university-harvard-s390-modules.csl (JabRef#4711) a789973 Chicago: Uppercase "Presentated at" if no `genre` (JabRef#4729) 143464e Fix comma before et al. for the-oncologist.csl (JabRef#4724) 3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (JabRef#4719) b2c0c1e APA: in-text title in title-case (JabRef#4725) 88c68d2 Fix et-al and indetation settings for mammalia.csl (JabRef#4717) 05940a2 Update the-febs-journal.csl (JabRef#4720) 1d77ba8 Request for review and assessment of the repa.csl (JabRef#4698) 76b4be5 Update isnad.csl (JabRef#4716) f709c84 Update isnad-dipnotlu.csl (JabRef#4715) 45d7655 Create mammalia.csl (JabRef#4714) eb333ca Update society-for-american-archaeology.csl (JabRef#4710) d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (JabRef#4712) 5e34eb1 Update animal-welfare.csl (JabRef#4713) 06785fa Update le-tapuscrit-author-date.csl (JabRef#4708) ada5282 Update norois.csl (JabRef#4707) git-subtree-dir: src/main/resources/csl-styles git-subtree-split: 906cd6d
906cd6d Create technische-universitat-dresden-linguistik-author-date (JabRef#4730) 607a056 Create ifao-publications.csl (JabRef#4731) 5a65f50 remove et-al settings for bibliography for PVS (JabRef#4735) 4a145d4 Create current-opinion-in-endocrinology-diabetes-and-obesity.csl (JabRef#4734) d70c2a4 Add chapter section in bibliography (JabRef#4732) 366dbc1 Create economic-history-review.csl (JabRef#4643) 7069ddc Create the-open-university-harvard-s390-modules.csl (JabRef#4711) a789973 Chicago: Uppercase "Presentated at" if no `genre` (JabRef#4729) 143464e Fix comma before et al. for the-oncologist.csl (JabRef#4724) 3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (JabRef#4719) b2c0c1e APA: in-text title in title-case (JabRef#4725) 88c68d2 Fix et-al and indetation settings for mammalia.csl (JabRef#4717) 05940a2 Update the-febs-journal.csl (JabRef#4720) 1d77ba8 Request for review and assessment of the repa.csl (JabRef#4698) 76b4be5 Update isnad.csl (JabRef#4716) f709c84 Update isnad-dipnotlu.csl (JabRef#4715) 45d7655 Create mammalia.csl (JabRef#4714) eb333ca Update society-for-american-archaeology.csl (JabRef#4710) d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (JabRef#4712) 5e34eb1 Update animal-welfare.csl (JabRef#4713) 06785fa Update le-tapuscrit-author-date.csl (JabRef#4708) ada5282 Update norois.csl (JabRef#4707) git-subtree-dir: src/main/resources/csl-styles git-subtree-split: 906cd6d
143464e Fix comma before et al. for the-oncologist.csl (JabRef#4724) 3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (JabRef#4719) b2c0c1e APA: in-text title in title-case (JabRef#4725) 88c68d2 Fix et-al and indetation settings for mammalia.csl (JabRef#4717) 05940a2 Update the-febs-journal.csl (JabRef#4720) 1d77ba8 Request for review and assessment of the repa.csl (JabRef#4698) 76b4be5 Update isnad.csl (JabRef#4716) f709c84 Update isnad-dipnotlu.csl (JabRef#4715) 45d7655 Create mammalia.csl (JabRef#4714) eb333ca Update society-for-american-archaeology.csl (JabRef#4710) d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (JabRef#4712) 5e34eb1 Update animal-welfare.csl (JabRef#4713) 06785fa Update le-tapuscrit-author-date.csl (JabRef#4708) ada5282 Update norois.csl (JabRef#4707) git-subtree-dir: src/main/resources/csl-styles git-subtree-split: 143464e
Fixes #4709.
Clean up the author value in
BracketedPattern
after it is retrieved from theBibEntry
.