Squelch newline citations

original commit: d7aa944ebac6bed0c7986ede99bd0fa1fb1e61c3
This commit is contained in:
Jay McCarthy 2012-02-16 14:45:23 -07:00
parent 404c08f8c3
commit e517a09290

View File

@ -142,9 +142,13 @@
(define bibtex-db (path->bibdb bib-pth))
(define-cite autobib-cite autobib-citet generate-bibliography-id)
(define ((make-citer citer) f . r)
(apply citer (map (curry generate-bib bibtex-db)
(append-map (curry regexp-split #rx" +")
(cons f r)))))
(apply citer
(filter-map
(λ (key)
(and (not (string=? "\n" key))
(generate-bib bibtex-db key)))
(append-map (curry regexp-split #rx" +")
(cons f r)))))
(define ~cite-id (make-citer autobib-cite))
(define citet-id (make-citer autobib-citet))))