diff --git a/CHANGELOG.md b/CHANGELOG.md index a4fc5d536ad7..c62d1a40194f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# - [#1758](https://github.com/JabRef/jabref/issues/1758) Added a button to open Database Properties dialog help - Improve focus of the maintable after a sidepane gets closed (Before it would focus the toolbar or it would focus the wrong entry) - File open dialogs now use default extensions as primary file filter +- [#1841](https://github.com/JabRef/jabref/issues/1841) The "etal"-string in in the Authors layout formatter can now be set empty ### Fixed - Fixed [#1760](https://github.com/JabRef/jabref/issues/1760): Preview updated correctly when selecting a single entry after selecting multiple entries diff --git a/src/main/java/net/sf/jabref/logic/layout/format/Authors.java b/src/main/java/net/sf/jabref/logic/layout/format/Authors.java index 4a4a440cdb76..99b319406d05 100644 --- a/src/main/java/net/sf/jabref/logic/layout/format/Authors.java +++ b/src/main/java/net/sf/jabref/logic/layout/format/Authors.java @@ -198,7 +198,7 @@ else if (Authors.SEPARATORS.contains(key.trim().toLowerCase()) || Authors.LAST_S } else if (comp(key, "LastSep") && !value.isEmpty()) { lastSeparator = value; } - } else if ("etal".equalsIgnoreCase(key.trim()) && !value.isEmpty()) { + } else if ("etal".equalsIgnoreCase(key.trim())) { etAlString = value; } else if (Authors.NUMBER_PATTERN.matcher(key.trim()).matches()) { // Just a number: diff --git a/src/test/java/net/sf/jabref/logic/layout/format/AuthorsTest.java b/src/test/java/net/sf/jabref/logic/layout/format/AuthorsTest.java index b1eb9705c200..2059a3711d53 100644 --- a/src/test/java/net/sf/jabref/logic/layout/format/AuthorsTest.java +++ b/src/test/java/net/sf/jabref/logic/layout/format/AuthorsTest.java @@ -129,4 +129,12 @@ public void testNoPeriod() { Assert.assertEquals("B C Bruce, C K von Manson and J Jumper", a.format("Bruce, Bob Croydon and Charles Kermit von Manson and Jumper, Jolly")); } + + @Test + public void testEmptyEtAl() { + ParamLayoutFormatter a = new Authors(); + a.setArgument("fullname, LastFirst, Comma, 3, etal="); + Assert.assertEquals("Bruce, Bob Croydon", + a.format("Bob Croydon Bruce and Charles Manson and Jolly Jumper and Chuck Chuckles")); + } }