From 9a091e2d4f7197bf7e2454975394eb6e4f9bf354 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Mon, 19 Mar 2012 11:09:33 -0400 Subject: [PATCH] Fix bug in autobib's handling of urls. original commit: 999de5a4884e07f4f5cc48910bd658b57ef46fdb --- collects/scriblib/autobib.rkt | 4 ++-- collects/tests/scribble/docs/autobib.scrbl | 9 +++++++++ collects/tests/scribble/docs/autobib.txt | 4 ++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/collects/scriblib/autobib.rkt b/collects/scriblib/autobib.rkt index 03e4c618..dc91c3ab 100644 --- a/collects/scriblib/autobib.rkt +++ b/collects/scriblib/autobib.rkt @@ -250,7 +250,7 @@ `(" " ,@(decode-content (list location)) ,(if date "," ".")) null) (if date `(" " - @,(if disambiguation + ,@(if disambiguation `("(" ,@(decode-content (list (render-date-bib date))) ,disambiguation ")") (decode-content (list (render-date-bib date)))) ".") @@ -314,7 +314,7 @@ (list title) (if location (decode-content (list location)) 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) diff --git a/collects/tests/scribble/docs/autobib.scrbl b/collects/tests/scribble/docs/autobib.scrbl index b12b38e2..635e4fba 100644 --- a/collects/tests/scribble/docs/autobib.scrbl +++ b/collects/tests/scribble/docs/autobib.scrbl @@ -11,9 +11,18 @@ #:is-book? #t #: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[(in-bib redex ", part I")] @cite[(in-bib redex ", part II")] @cite[redex] +@cite[schelog] + @(gen) diff --git a/collects/tests/scribble/docs/autobib.txt b/collects/tests/scribble/docs/autobib.txt index aa448e64..2ed9ab5c 100644 --- a/collects/tests/scribble/docs/autobib.txt +++ b/collects/tests/scribble/docs/autobib.txt @@ -1,7 +1,11 @@  (Felleisen et al. 2010)  (Felleisen et al. 2010, part I)  (Felleisen et al. 2010, part II)  (Felleisen et al. 2010) + (Sitaram 1993) + 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 Engineering with PLT Redex. MIT Press, 2010.