fix contract
original commit: fba1777b8ad6d84200e17c85896f9f6d210b0d1d
This commit is contained in:
parent
9e9a62ff99
commit
76e087da84
|
@ -9,21 +9,22 @@
|
||||||
(prefix-in html: "html-render.rkt"))
|
(prefix-in html: "html-render.rkt"))
|
||||||
|
|
||||||
(provide/contract
|
(provide/contract
|
||||||
[render ((listof part?)
|
[render (((listof part?)
|
||||||
(listof path-string?)
|
(listof path-string?))
|
||||||
#:render-mixin (class? . -> . class?)
|
(#:render-mixin
|
||||||
#:dest-dir (or/c #f path-string?)
|
(class? . -> . class?)
|
||||||
#:prefix-file (or/c #f path-string?)
|
#:dest-dir (or/c #f path-string?)
|
||||||
#:style-file (or/c #f path-string?)
|
#:prefix-file (or/c #f path-string?)
|
||||||
#:style-extra-files (listof path-string?)
|
#:style-file (or/c #f path-string?)
|
||||||
#:extra-files (listof path-string?)
|
#:style-extra-files (listof path-string?)
|
||||||
#:redirect (or/c #f string?)
|
#:extra-files (listof path-string?)
|
||||||
#:redirect-main (or/c #f string?)
|
#:redirect (or/c #f string?)
|
||||||
#:xrefs (listof xref?)
|
#:redirect-main (or/c #f string?)
|
||||||
#:info-in-files (listof path?)
|
#:xrefs (listof xref?)
|
||||||
#:info-out-file (or/c #f path-string?)
|
#:info-in-files (listof path?)
|
||||||
#:quiet? any/c
|
#:info-out-file (or/c #f path-string?)
|
||||||
. -> . void?)])
|
#:quiet? any/c)
|
||||||
|
. ->* . void?)])
|
||||||
|
|
||||||
(define (render docs
|
(define (render docs
|
||||||
names
|
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