commit 76e087da84d6a69c53e0d7ba6b57069e8eb3b0e2 parent 9e9a62ff99c5f62996fe8b0ef926cb95a3e7ea70 Author: Matthew Flatt <mflatt@racket-lang.org> Date: Tue, 2 Aug 2011 06:39:47 -0600 fix contract original commit: fba1777b8ad6d84200e17c85896f9f6d210b0d1d Diffstat:
| M | collects/scribble/render.rkt | | | 31 | ++++++++++++++++--------------- |
| A | collects/tests/scribble/render.rkt | | | 22 | ++++++++++++++++++++++ |
2 files changed, 38 insertions(+), 15 deletions(-)
diff --git a/collects/scribble/render.rkt b/collects/scribble/render.rkt @@ -9,21 +9,22 @@ (prefix-in html: "html-render.rkt")) (provide/contract - [render ((listof part?) - (listof path-string?) - #:render-mixin (class? . -> . class?) - #:dest-dir (or/c #f path-string?) - #:prefix-file (or/c #f path-string?) - #:style-file (or/c #f path-string?) - #:style-extra-files (listof path-string?) - #:extra-files (listof path-string?) - #:redirect (or/c #f string?) - #:redirect-main (or/c #f string?) - #:xrefs (listof xref?) - #:info-in-files (listof path?) - #:info-out-file (or/c #f path-string?) - #:quiet? any/c - . -> . void?)]) + [render (((listof part?) + (listof path-string?)) + (#:render-mixin + (class? . -> . class?) + #:dest-dir (or/c #f path-string?) + #:prefix-file (or/c #f path-string?) + #:style-file (or/c #f path-string?) + #:style-extra-files (listof path-string?) + #:extra-files (listof path-string?) + #:redirect (or/c #f string?) + #:redirect-main (or/c #f string?) + #:xrefs (listof xref?) + #:info-in-files (listof path?) + #:info-out-file (or/c #f path-string?) + #:quiet? any/c) + . ->* . void?)]) (define (render docs names diff --git a/collects/tests/scribble/render.rkt b/collects/tests/scribble/render.rkt @@ -0,0 +1,22 @@ +#lang racket/base +(require scribble/render + scribble/text-render + scribble/core + racket/file) + +(render (list (part #f + null + (list "Render") + (style #f null) + null + (list (paragraph (style #f null) "The content.")) + null)) + (list "example") + #:render-mixin render-mixin) + +(unless (string=? "Render\n\nThe content.\n" + (file->string "example.txt")) + (error "render test failed")) + +(delete-file "example.txt") +