commit dfc235da21def8d90dbab54a0476544b0d05b2f1
parent 6089214479c04e52bdd7dadff42d73400c1a16a8
Author: Matthew Flatt <mflatt@racket-lang.org>
Date: Fri, 30 Apr 2010 16:12:57 -0600
SHA-1-based checking of doc dependencies
original commit: 17c1dc1ab98c1c93ef2f6f197d0638cc36e79c17
Diffstat:
3 files changed, 23 insertions(+), 17 deletions(-)
diff --git a/collects/scribble/eval.rkt b/collects/scribble/eval.rkt
@@ -7,7 +7,7 @@
racket/file
racket/sandbox
racket/promise
- mzlib/string
+ racket/string
(for-syntax racket/base))
(provide interaction
@@ -97,18 +97,24 @@
(map
(lambda (s)
(car (format-output s error-color)))
- (let sloop ([s (caar val-list+outputs)])
- (if ((string-length s) . > . maxlen)
- ;; break the error message into multiple lines:
- (let loop ([pos (sub1 maxlen)])
- (cond
- [(zero? pos) (cons (substring s 0 maxlen)
- (sloop (substring s maxlen)))]
- [(char-whitespace? (string-ref s pos))
- (cons (substring s 0 pos)
- (sloop (substring s (add1 pos))))]
- [else (loop (sub1 pos))]))
- (list s))))
+ (filter
+ (lambda (s) (not (equal? s "")))
+ (let sloop ([s (caar val-list+outputs)])
+ (apply
+ append
+ (map (lambda (s)
+ (if ((string-length s) . > . maxlen)
+ ;; break the error message into multiple lines:
+ (let loop ([pos (sub1 maxlen)])
+ (cond
+ [(zero? pos) (cons (substring s 0 maxlen)
+ (sloop (substring s maxlen)))]
+ [(char-whitespace? (string-ref s pos))
+ (cons (substring s 0 pos)
+ (sloop (substring s (add1 pos))))]
+ [else (loop (sub1 pos))]))
+ (list s)))
+ (regexp-split #rx"\n" s))))))
;; Normal result case:
(let ([val-list (caar val-list+outputs)])
(if (equal? val-list (list (void)))
diff --git a/collects/scribblings/scribble/eval.scrbl b/collects/scribblings/scribble/eval.scrbl
@@ -28,9 +28,9 @@ evaluator is created using @scheme[make-base-eval]. See also
Uses of @scheme[code:comment] and @schemeidfont{code:blank} are
stipped from each @scheme[datum] before evaluation.
-If a @scheme[datum] has the form @scheme[(eval:alts #,(svar
-show-datum) #,(svar eval-datum))], then @svar[show-datum] is typeset,
-while @svar[eval-datum] is evaluated.}
+If a @scheme[datum] has the form @scheme[(@#,indexed-scheme[eval:alts]
+#,(svar show-datum) #,(svar eval-datum))], then @svar[show-datum] is
+typeset, while @svar[eval-datum] is evaluated.}
@defform*[[(interaction-eval datum)
diff --git a/collects/scribblings/scribble/scribble.scrbl b/collects/scribblings/scribble/scribble.scrbl
@@ -2,7 +2,7 @@
@(require scribble/bnf
"utils.ss")
-@title{@bold{Scribble}: PLT Documentation Tool}
+@title{@bold{Scribble}: Racket Documentation Tool}
@author["Matthew Flatt" "Eli Barzilay"]