Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into changemergesdialog
Browse files Browse the repository at this point in the history
* upstream/master:
  Improve ignored dependencies
  Run tests also on PR
  Add latex2unicode formatter for displaying previews (#5785)
  • Loading branch information
Siedlerchr committed Dec 29, 2019
2 parents 756d4bc + 3dd6468 commit fa6fb54
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/tests-oracle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ on:
- 'src/test/java/org/jabref/logic/shared/**'
- '.github/workflows/tests-oracle.yml'
- 'build.gradle'
pull_request:
paths:
- 'src/test/java/org/jabref/model/database/**'
- 'src/test/java/org/jabref/logic/shared/**'
- '.github/workflows/tests-oracle.yml'
- 'build.gradle'
schedule:
# run on each Wednesday
- cron: '2 3 * * 3'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Tests

on: [push]
on: [push, pull_request]

jobs:
checkstyle:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#

- We fixed an issue where the Medline fetcher was only working when JabRef was running from source [#5645](https://github.com/JabRef/jabref/issues/5645)
- We fixed some visual issues in the dark theme [#5764](https://github.com/JabRef/jabref/pull/5764) [#5753](https://github.com/JabRef/jabref/issues/5753)
- We fixed an issue where non-default previews didn't handle unicode characters. [#5779](https://github.com/JabRef/jabref/issues/5779)


### Removed

Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ dependencyUpdates.resolutionStrategy = {
}
}
rules.withModule("de.jensd:fontawesomefx-materialdesignfont") { ComponentSelection selection ->
if (selection.candidate.version ==~ /2.0.26-9.1.2/) {
if (selection.candidate.version ==~ /2.0.26-9.1.1/ || selection.candidate.version ==~ /2.0.26-9.1.2/) {
selection.reject('1.7.22-11 is actually newer (strange version system)')
}
}
Expand All @@ -265,12 +265,12 @@ dependencyUpdates.resolutionStrategy = {
}
}
rules.withModule("com.microsoft.azure:applicationinsights-core") { ComponentSelection selection ->
if (selection.candidate.version ==~ /2.5.1/) {
if (selection.candidate.version ==~ /2.5.0/ || selection.candidate.version ==~ /2.5.1/) {
selection.reject("Does not work due to bug, see https://github.com/JabRef/jabref/pull/5596")
}
}
rules.withModule("com.microsoft.azure:applicationinsights-logging-log4j2") { ComponentSelection selection ->
if (selection.candidate.version ==~ /2.5.1/) {
if (selection.candidate.version ==~ /2.5.0/ || selection.candidate.version ==~ /2.5.1/) {
selection.reject("Does not work due to bug, see https://github.com/JabRef/jabref/pull/5596")
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/jabref/logic/citationstyle/CSLAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import de.undercouch.citeproc.bibtex.BibTeXConverter;
import de.undercouch.citeproc.csl.CSLItemData;
import de.undercouch.citeproc.output.Bibliography;
import org.jabref.model.strings.LatexToUnicodeAdapter;
import org.jbibtex.BibTeXEntry;
import org.jbibtex.DigitStringValue;
import org.jbibtex.Key;
Expand Down Expand Up @@ -97,6 +98,7 @@ private static CSLItemData bibEntryToCSLItemData(BibEntry bibEntry) {
for (Field key : bibEntry.getFieldMap().keySet()) {
bibEntry.getField(key)
.map(removeNewlinesFormatter::format)
.map(LatexToUnicodeAdapter::format)
.map(latexToHtmlConverter::format)
.ifPresent(value -> {
if (StandardField.MONTH.equals(key)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,17 @@ void testXslFoFormat() {
String actualCitation = CitationStyleGenerator.generateCitation(entry, style, format);
assertEquals(expectedCitation, actualCitation);
}

@Test
void testHandleDiacritics() {
BibEntry entry = new BibEntry();
entry.setField(StandardField.AUTHOR, "L{\"a}st, First and Doe, Jane");
// if the default citation style changes this has to be modified.
// in this case ä was added to check if it is formatted appropriately
String expected = " <div class=\"csl-entry\">\n" +
" <div class=\"csl-left-margin\">[1]</div><div class=\"csl-right-inline\">F. Läst and J. Doe, .</div>\n" +
" </div>\n";
String citation = CitationStyleGenerator.generateCitation(entry, CitationStyle.getDefault());
assertEquals(expected, citation);
}
}

0 comments on commit fa6fb54

Please sign in to comment.