diff options
Diffstat (limited to 'skate')
-rw-r--r-- | skate/reduce.go | 2 | ||||
-rw-r--r-- | skate/reduce_test.go | 4 | ||||
-rw-r--r-- | skate/schema.go | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/skate/reduce.go b/skate/reduce.go index e2fa130..356ed25 100644 --- a/skate/reduce.go +++ b/skate/reduce.go @@ -598,7 +598,7 @@ func matchedRefsExtend(matched []*BiblioRef, refs []*Ref, stats *statsAugment) [ Title: r.Biblio.Title, URL: r.Biblio.Url, Volume: r.Biblio.Volume, - Issued: CSLDate{ + Issued: &CSLDate{ Raw: year, }, } diff --git a/skate/reduce_test.go b/skate/reduce_test.go index 9c134f8..7cde68f 100644 --- a/skate/reduce_test.go +++ b/skate/reduce_test.go @@ -199,7 +199,7 @@ func TestMatchedRefsExtend(t *testing.T) { MatchReason: ReasonUnknown.Short(), SourceYear: "0", TargetCSL: &CSL{ - Accessed: CSLDate{}, + Accessed: nil, Author: nil, CollectionTitle: "", ContainerTitle: "", @@ -209,7 +209,7 @@ func TestMatchedRefsExtend(t *testing.T) { ISBN: "", ISSN: "", Issue: "", - Issued: CSLDate{}, + Issued: &CSLDate{}, JournalAbbreviation: "", Language: "", NumberOfPages: "", diff --git a/skate/schema.go b/skate/schema.go index 93c9680..50f52d6 100644 --- a/skate/schema.go +++ b/skate/schema.go @@ -431,7 +431,7 @@ type BiblioRef struct { // https://github.com/citation-style-language/schema, // https://navneethg.github.io/jsonschemaviewer/. This is a subset only. type CSL struct { - Accessed CSLDate `json:"accessed,omitempty"` + Accessed *CSLDate `json:"accessed,omitempty"` Author []CSLAuthor `json:"author,omitempty"` CollectionTitle string `json:"collection-title,omitempty"` ContainerTitle string `json:"container-title,omitempty"` @@ -441,7 +441,7 @@ type CSL struct { ISBN string `json:"ISBN,omitempty"` ISSN string `json:"ISSN,omitempty"` Issue string `json:"issue,omitempty"` - Issued CSLDate `json:"issued,omitempty"` + Issued *CSLDate `json:"issued,omitempty"` JournalAbbreviation string `json:"journalAbbreviation,omitempty"` Language string `json:"language,omitempty"` NumberOfPages string `json:"number-of-pages,omitempty"` |