fix contract
original commit: fba1777b8ad6d84200e17c85896f9f6d210b0d1d
This commit is contained in:
parent
9e9a62ff99
commit
76e087da84
|
@ -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
|
||||
|
|
22
collects/tests/scribble/render.rkt
Normal file
22
collects/tests/scribble/render.rkt
Normal file
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user