Fix bug in autobib's handling of urls.

This commit is contained in:
Vincent St-Amour 2012-03-19 11:09:33 -04:00
parent 9bc1684c9b
commit 999de5a488
3 changed files with 15 additions and 2 deletions

View File

@ -250,7 +250,7 @@
`(" " ,@(decode-content (list location)) ,(if date "," ".")) `(" " ,@(decode-content (list location)) ,(if date "," "."))
null) null)
(if date `(" " (if date `(" "
@,(if disambiguation ,@(if disambiguation
`("(" ,@(decode-content (list (render-date-bib date))) ,disambiguation ")") `("(" ,@(decode-content (list (render-date-bib date))) ,disambiguation ")")
(decode-content (list (render-date-bib date)))) (decode-content (list (render-date-bib date))))
".") ".")
@ -314,7 +314,7 @@
(list title) (list title)
(if location (decode-content (list location)) null) (if location (decode-content (list location)) null)
(if date (decode-content (list (default-render-date-bib parsed-date))) null) (if date (decode-content (list (default-render-date-bib parsed-date))) null)
(if url (link url (make-element 'url (list url))) null)))) (if url (list (link url (make-element 'url (list url)))) null))))
"")) ""))
(define (in-bib bib where) (define (in-bib bib where)

View File

@ -11,9 +11,18 @@
#:is-book? #t #:is-book? #t
#:date "2010")) #:date "2010"))
@(define schelog ; tests that urls work
(make-bib #:title "Programming in Schelog"
#:author "Dorai Sitaram"
#:url "http://www.ccs.neu.edu/~dorai/schelog/schelog.html"
#:date "1993"))
@cite[redex] @cite[redex]
@cite[(in-bib redex ", part I")] @cite[(in-bib redex ", part I")]
@cite[(in-bib redex ", part II")] @cite[(in-bib redex ", part II")]
@cite[redex] @cite[redex]
@cite[schelog]
@(gen) @(gen)

View File

@ -1,7 +1,11 @@
 (Felleisen et al. 2010)  (Felleisen et al. 2010, part I)  (Felleisen et  (Felleisen et al. 2010)  (Felleisen et al. 2010, part I)  (Felleisen et
al. 2010, part II)  (Felleisen et al. 2010) al. 2010, part II)  (Felleisen et al. 2010)
 (Sitaram 1993)
Bibliography Bibliography
Dorai Sitaram. Programming in Schelog. 1993.
http://www.ccs.neu.edu/~dorai/schelog/schelog.html
Matthias Felleisen, Robert Bruce Findler, and Matthew Flatt. Semantics Matthias Felleisen, Robert Bruce Findler, and Matthew Flatt. Semantics
Engineering with PLT Redex. MIT Press, 2010. Engineering with PLT Redex. MIT Press, 2010.