Skip to content

Commit

Permalink
Merge branch 'rpb-228-links' of https://github.com/hbz/rpb into main
Browse files Browse the repository at this point in the history
  • Loading branch information
fsteeg committed Dec 20, 2024
2 parents 0ff0981 + 23ee75c commit 2b87696
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/TableRow.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ String[] refAndLabel(String property, String value,
if ((property.equals("containedIn") || property.equals("hasPart")
|| property.equals("isPartOf") || property.equals("hasSuperordinate")
|| property.equals("bibliographicCitation")) && value.contains("lobid.org")) {
return new String[] { value, Lobid.resourceLabel(value) };
return new String[] { value.matches(".*?[as]\\d+.*|.*?\\d{3}[a-z]\\d+.*") // rpbId
? value.replace("https://lobid.org/resources/", "/")
: value, Lobid.resourceLabel(value) };
}
String label =
labels.isPresent() && labels.get().size() > 0 ? labels.get().get(0)
Expand Down

0 comments on commit 2b87696

Please sign in to comment.