Skip to content

Commit

Permalink
crossref: #21429
Browse files Browse the repository at this point in the history
  • Loading branch information
miku committed Nov 7, 2024
1 parent 1dabcb0 commit b2caf2a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions formats/crossref/document_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ func TestDocumentCombinedTitle(t *testing.T) {
},
result: "Hello Sub",
},
{
doc: &Document{
Title: []string{"Deutsche Nationalkataloge – Herausforderungen an das deutsche Bibliothekssystem"},
Subtitle: []string{"Was aus der Perspektive der Digital Humanities zu tun wäre"},
},
result: "Deutsche Nationalkataloge – Herausforderungen an das deutsche Bibliothekssystem : Was aus der Perspektive der Digital Humanities zu tun wäre",
},
}
for _, c := range cases {
result := c.doc.CombinedTitle()
Expand Down
6 changes: 5 additions & 1 deletion formats/finc/solr.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ func (s *Solr5Vufind3) convert(is IntermediateSchema, withFullrecord bool) error
}

s.SourceID = is.SourceID
s.Subtitle = is.ArticleSubtitle
if len(is.ArticleSubtitle) > 20 && !strings.Contains(s.Title, is.ArticleSubtitle) {
// refs #21429, avoid duplications, e.g. crossref assembles a title
// from both title and subtitle already
s.Subtitle = is.ArticleSubtitle
}
s.TitleSort = is.SortableTitle()
s.Topics = is.Subjects

Expand Down

0 comments on commit b2caf2a

Please sign in to comment.