It was possible for a multi-citation to be ambiguous and mention a something not referenced anywhere else. Added a safeguard so that the citation hash is properly populated.
original commit: 337be4a677bdbd3aeae9926fd45727944ed63d3d
This commit is contained in:
parent
ca961ce44b
commit
875843a4e1
|
@ -51,18 +51,15 @@
|
||||||
(auto-bib-specific bib-entry)
|
(auto-bib-specific bib-entry)
|
||||||
""))
|
""))
|
||||||
`(autobib ,(auto-bib-key bib-entry)))
|
`(autobib ,(auto-bib-key bib-entry)))
|
||||||
(cond [(and disambiguation
|
(cond [disambiguation ;; should be a list of bib-entries with same author/date
|
||||||
(or (pair? (cdr disambiguation))
|
|
||||||
(and (null? (cdr disambiguation))
|
|
||||||
))) ;; should be a list of bib-entries with same author/date
|
|
||||||
(define disambiguation*
|
(define disambiguation*
|
||||||
(add-between (for/list ([bib (in-list disambiguation)])
|
(add-between (for/list ([bib (in-list disambiguation)])
|
||||||
(define key (auto-bib-key bib))
|
(define key (auto-bib-key bib))
|
||||||
(define maybe-disambiguation
|
(define maybe-disambiguation
|
||||||
(resolve-get part ri `(autobib-disambiguation key)))
|
(resolve-get part ri `(autobib-disambiguation ,key)))
|
||||||
(case maybe-disambiguation
|
(case maybe-disambiguation
|
||||||
[(unambiguous) #f]
|
[(unambiguous) #f]
|
||||||
[else (make-link-element #f (list maybe-disambiguation) `(autobib ,key))]))
|
[else (make-link-element #f maybe-disambiguation `(autobib ,key))]))
|
||||||
","))
|
","))
|
||||||
(cond [(not (car disambiguation*)) '()] ;; the bib was unambiguous
|
(cond [(not (car disambiguation*)) '()] ;; the bib was unambiguous
|
||||||
[else disambiguation*])]
|
[else disambiguation*])]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user