-
-
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
Support \r when using CitationStyles #2165
Conversation
@@ -56,17 +56,18 @@ protected static String generateCitation(BibEntry entry, String style, CitationS | |||
|
|||
} catch (IOException | ArrayIndexOutOfBoundsException e) { | |||
LOGGER.error("Could not generate BibEntry Citation", e); | |||
return Localization.lang("Cannot generate Citation"); |
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, this generates the string displayed in the preview panel. Maybe, the message should be "Cannot generate preview based on selected citation style".
Further, "Citation" is not a fixed term, which should be uppercased. Put it lower case as most English words are lower case.
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.
fixed
Have you filed an upstream issue? You know, including minimal example. Similar to @obraliar did it for pgjdb-ng (https://github.com/obraliar/pgjdbc-ng-test#pgjdbc-ng-casing-test). Maybe you also dived into the CSL library and could propose a fix for the lib (PR at their repo) |
Is it possible to add a test case based on the example of JabRef#174. Further, a test case covering the exception branch should be made. Maybe using an invalid latex sequene in the entry helps to generate the exception? Besides these minor comments: LGTM. |
Sadly I cannot reproduce another case where the I created an issue in the repository of the library: michel-kraemer/citeproc-java#30. |
OK for me. - Either we keep this fix or include |
If I got this right, just use the SNAPSHOT version for now. Is a more long term solution using the fixed version instead of monkey-patching it? |
Used the Snapshot which gets rid of the Rhino dependency as well. |
Fixes: JabRef#174
The CitationStyle library cannot handle
\r
thus I parse to aspace
.I also added another return (and localization) to always have a feedback for the user.