From abeb37b101535454685b8e8d83b7a080b69bab70 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 1 Oct 2012 07:13:52 -0600 Subject: [PATCH] scriblib/autobib: more graceful failure when bib not rendered original commit: 6a5f73d3d9e4e9570c657f77ca8bf20c3510a2b8 --- collects/scriblib/autobib.rkt | 1 + .../tests/scribble/docs/autobib-broken.scrbl | 17 +++++++++++++++++ collects/tests/scribble/docs/autobib-broken.txt | 1 + 3 files changed, 19 insertions(+) create mode 100644 collects/tests/scribble/docs/autobib-broken.scrbl create mode 100644 collects/tests/scribble/docs/autobib-broken.txt diff --git a/collects/scriblib/autobib.rkt b/collects/scriblib/autobib.rkt index a6b8730a..548b4d04 100644 --- a/collects/scriblib/autobib.rkt +++ b/collects/scriblib/autobib.rkt @@ -69,6 +69,7 @@ (define maybe-disambiguation (resolve-get part ri `(autobib-disambiguation ,key))) (case maybe-disambiguation + [(#f) #f] [(unambiguous) #f] [else (make-link-element #f maybe-disambiguation `(autobib ,key))])) ",")) diff --git a/collects/tests/scribble/docs/autobib-broken.scrbl b/collects/tests/scribble/docs/autobib-broken.scrbl new file mode 100644 index 00000000..d6c73646 --- /dev/null +++ b/collects/tests/scribble/docs/autobib-broken.scrbl @@ -0,0 +1,17 @@ +#lang scribble/base +@(require scriblib/autobib) + +@(define-cite cite citet gen) + +@(define redex + (make-bib + #:author (authors "Matthias Felleisen" "Robert Bruce Findler" "Matthew Flatt") + #:title "Semantics Engineering with PLT Redex" + #:location (book-location #:publisher "MIT Press") + #:is-book? #t + #:date "2010")) + +Since there's no bibliography, this link won't work: +@cite[redex]. + + diff --git a/collects/tests/scribble/docs/autobib-broken.txt b/collects/tests/scribble/docs/autobib-broken.txt new file mode 100644 index 00000000..6f97337c --- /dev/null +++ b/collects/tests/scribble/docs/autobib-broken.txt @@ -0,0 +1 @@ +Since there’s no bibliography, this link won’t work:  (??? ???).