`scribble' reports broken cross references by default
original commit: 39edc5a5991d17c8becfc7a1b44665fb5cd9d622
This commit is contained in:
parent
af3a99ae55
commit
8890f72c3a
|
@ -39,7 +39,8 @@
|
||||||
#:xrefs [xrefs null]
|
#:xrefs [xrefs null]
|
||||||
#:info-in-files [info-input-files null]
|
#:info-in-files [info-input-files null]
|
||||||
#:info-out-file [info-output-file #f]
|
#:info-out-file [info-output-file #f]
|
||||||
#:quiet? [quiet? #t])
|
#:quiet? [quiet? #t]
|
||||||
|
#:warn-undefined? [warn-undefined? (not quiet?)])
|
||||||
(when dest-dir (make-directory* dest-dir))
|
(when dest-dir (make-directory* dest-dir))
|
||||||
(let ([renderer (new (render-mixin render%)
|
(let ([renderer (new (render-mixin render%)
|
||||||
[dest-dir dest-dir]
|
[dest-dir dest-dir]
|
||||||
|
@ -73,5 +74,11 @@
|
||||||
(let ([s (send renderer serialize-info r-info)])
|
(let ([s (send renderer serialize-info r-info)])
|
||||||
(with-output-to-file info-output-file
|
(with-output-to-file info-output-file
|
||||||
#:exists 'truncate/replace
|
#:exists 'truncate/replace
|
||||||
(lambda () (write s))))))
|
(lambda () (write s)))))
|
||||||
|
(when warn-undefined?
|
||||||
|
(let ([undef (send renderer get-undefined r-info)])
|
||||||
|
(unless (null? undef)
|
||||||
|
(eprintf "Warning: some cross references may be broken due to undefined tags:\n")
|
||||||
|
(for ([t (in-list undef)])
|
||||||
|
(eprintf " ~s\n" t))))))
|
||||||
(void))))
|
(void))))
|
||||||
|
|
|
@ -91,7 +91,7 @@
|
||||||
(current-info-input-files
|
(current-info-input-files
|
||||||
(cons file (current-info-input-files)))]
|
(cons file (current-info-input-files)))]
|
||||||
#:once-each
|
#:once-each
|
||||||
[("--quiet") "suppress output-file reporting"
|
[("--quiet") "suppress output-file and undefined-tag reporting"
|
||||||
(current-quiet #t)]
|
(current-quiet #t)]
|
||||||
#:args (file . another-file)
|
#:args (file . another-file)
|
||||||
(let ([files (cons file another-file)])
|
(let ([files (cons file another-file)])
|
||||||
|
|
|
@ -46,7 +46,8 @@ function to render a document.
|
||||||
[#:info-out-file info-out-file (or/c #f path-string?) #f]
|
[#:info-out-file info-out-file (or/c #f path-string?) #f]
|
||||||
[#:redirect redirect (or/c #f string?) #f]
|
[#:redirect redirect (or/c #f string?) #f]
|
||||||
[#:redirect-main redirect-main (or/c #f string?) #f]
|
[#:redirect-main redirect-main (or/c #f string?) #f]
|
||||||
[#:quiet? quiet? any/c #f])
|
[#:quiet? quiet? any/c #t]
|
||||||
|
[#:warn-undefined? warn-undefined? any/c (not quiet?)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Renders the given @racket[docs], each with an output name derived from
|
Renders the given @racket[docs], each with an output name derived from
|
||||||
|
@ -78,8 +79,12 @@ to the @racket[set-external-tag-path] and
|
||||||
@racketmodname[scribble/html-render], so they should be
|
@racketmodname[scribble/html-render], so they should be
|
||||||
non-@racket[#f] only for HTML rendering.
|
non-@racket[#f] only for HTML rendering.
|
||||||
|
|
||||||
If @racket[quiet?] is a true value, output-file information is written
|
If @racket[quiet?] is a false value, output-file information is
|
||||||
to the current output port.}
|
written to the current output port.
|
||||||
|
|
||||||
|
If @racket[warn-undefined?] is a true value, then references to
|
||||||
|
missing cross-reference targets trigger a warning message on the
|
||||||
|
current error port.}
|
||||||
|
|
||||||
|
|
||||||
@section{Base Renderer}
|
@section{Base Renderer}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user