Skip to content

Commit

Permalink
Keep common words together when sorting journal list (#611)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsteeg committed Jan 24, 2024
1 parent 1e6cd68 commit 21442d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/nwbib/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ public static Promise<Result> journals() {
}

private static String sortValue(Map<String, String> map, final String key) {
return map.get(key).replaceAll("^(Der|Die|Das|\\.\\.\\.)\\s", "");
String value = map.get(key).replaceAll("^(Der|Die|Das|\\.\\.\\.)\\s", "");
return Arrays.asList(value.split("\\s")).toString();
}

private static String journalLabelFor(JsonNode doc) {
Expand Down

0 comments on commit 21442d7

Please sign in to comment.