Skip to content

Commit fa6fb54

Browse files
committed
Merge remote-tracking branch 'upstream/master' into changemergesdialog
* upstream/master: Improve ignored dependencies Run tests also on PR Add latex2unicode formatter for displaying previews (#5785)
2 parents 756d4bc + 3dd6468 commit fa6fb54

File tree

6 files changed

+27
-4
lines changed

6 files changed

+27
-4
lines changed

Diff for: .github/workflows/tests-oracle.yml

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ on:
77
- 'src/test/java/org/jabref/logic/shared/**'
88
- '.github/workflows/tests-oracle.yml'
99
- 'build.gradle'
10+
pull_request:
11+
paths:
12+
- 'src/test/java/org/jabref/model/database/**'
13+
- 'src/test/java/org/jabref/logic/shared/**'
14+
- '.github/workflows/tests-oracle.yml'
15+
- 'build.gradle'
1016
schedule:
1117
# run on each Wednesday
1218
- cron: '2 3 * * 3'

Diff for: .github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Tests
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
66
checkstyle:

Diff for: CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
1717

1818
- 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)
1919
- 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)
20+
- We fixed an issue where non-default previews didn't handle unicode characters. [#5779](https://github.com/JabRef/jabref/issues/5779)
21+
2022

2123
### Removed
2224

Diff for: build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ dependencyUpdates.resolutionStrategy = {
255255
}
256256
}
257257
rules.withModule("de.jensd:fontawesomefx-materialdesignfont") { ComponentSelection selection ->
258-
if (selection.candidate.version ==~ /2.0.26-9.1.2/) {
258+
if (selection.candidate.version ==~ /2.0.26-9.1.1/ || selection.candidate.version ==~ /2.0.26-9.1.2/) {
259259
selection.reject('1.7.22-11 is actually newer (strange version system)')
260260
}
261261
}
@@ -265,12 +265,12 @@ dependencyUpdates.resolutionStrategy = {
265265
}
266266
}
267267
rules.withModule("com.microsoft.azure:applicationinsights-core") { ComponentSelection selection ->
268-
if (selection.candidate.version ==~ /2.5.1/) {
268+
if (selection.candidate.version ==~ /2.5.0/ || selection.candidate.version ==~ /2.5.1/) {
269269
selection.reject("Does not work due to bug, see https://github.com/JabRef/jabref/pull/5596")
270270
}
271271
}
272272
rules.withModule("com.microsoft.azure:applicationinsights-logging-log4j2") { ComponentSelection selection ->
273-
if (selection.candidate.version ==~ /2.5.1/) {
273+
if (selection.candidate.version ==~ /2.5.0/ || selection.candidate.version ==~ /2.5.1/) {
274274
selection.reject("Does not work due to bug, see https://github.com/JabRef/jabref/pull/5596")
275275
}
276276
}

Diff for: src/main/java/org/jabref/logic/citationstyle/CSLAdapter.java

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import de.undercouch.citeproc.bibtex.BibTeXConverter;
1919
import de.undercouch.citeproc.csl.CSLItemData;
2020
import de.undercouch.citeproc.output.Bibliography;
21+
import org.jabref.model.strings.LatexToUnicodeAdapter;
2122
import org.jbibtex.BibTeXEntry;
2223
import org.jbibtex.DigitStringValue;
2324
import org.jbibtex.Key;
@@ -97,6 +98,7 @@ private static CSLItemData bibEntryToCSLItemData(BibEntry bibEntry) {
9798
for (Field key : bibEntry.getFieldMap().keySet()) {
9899
bibEntry.getField(key)
99100
.map(removeNewlinesFormatter::format)
101+
.map(LatexToUnicodeAdapter::format)
100102
.map(latexToHtmlConverter::format)
101103
.ifPresent(value -> {
102104
if (StandardField.MONTH.equals(key)) {

Diff for: src/test/java/org/jabref/logic/citationstyle/CitationStyleGeneratorTest.java

+13
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,17 @@ void testXslFoFormat() {
117117
String actualCitation = CitationStyleGenerator.generateCitation(entry, style, format);
118118
assertEquals(expectedCitation, actualCitation);
119119
}
120+
121+
@Test
122+
void testHandleDiacritics() {
123+
BibEntry entry = new BibEntry();
124+
entry.setField(StandardField.AUTHOR, "L{\"a}st, First and Doe, Jane");
125+
// if the default citation style changes this has to be modified.
126+
// in this case ä was added to check if it is formatted appropriately
127+
String expected = " <div class=\"csl-entry\">\n" +
128+
" <div class=\"csl-left-margin\">[1]</div><div class=\"csl-right-inline\">F. Läst and J. Doe, .</div>\n" +
129+
" </div>\n";
130+
String citation = CitationStyleGenerator.generateCitation(entry, CitationStyle.getDefault());
131+
assertEquals(expected, citation);
132+
}
120133
}

0 commit comments

Comments
 (0)