fix rendering of example in Guide

closes PR 13517

original commit: 44947880177d903e333f1da3d9cdf4c7a2342eb8
This commit is contained in:
Robby Findler 2013-02-13 07:24:50 -06:00
parent b1048aa2fa
commit 05008e5188
2 changed files with 10 additions and 5 deletions

View File

@ -29,11 +29,13 @@
(define-syntax-rule (provide-styling id ...)
(provide/contract [id styling-f/c] ...))
(provide-styling racketmodfont racketoutput
racketerror racketfont racketvalfont racketresultfont racketidfont racketvarfont
racketerror racketfont racketvalfont racketidfont racketvarfont
racketcommentfont racketparenfont racketkeywordfont racketmetafont
onscreen defterm filepath exec envvar Flag DFlag PFlag DPFlag math
procedure
indexed-file indexed-envvar idefterm pidefterm)
(provide
(contract-out [racketresultfont (->* () (#:decode? boolean?) #:rest (listof pre-content?) element?)]))
(define-syntax-rule (provide-scheme-styling [rid sid] ...)
(provide/contract [rename rid sid styling-f/c] ...))
(provide-scheme-styling [racketmodfont schememodfont]
@ -91,8 +93,8 @@
(apply tt str))
(define (racketvalfont . str)
(make-element value-color (decode-content str)))
(define (racketresultfont . str)
(make-element result-color (decode-content str)))
(define (racketresultfont #:decode? [decode? #t] . str)
(make-element result-color (if decode? (decode-content str) str)))
(define (racketidfont . str)
(make-element symbol-color (decode-content str)))
(define (racketvarfont . str)

View File

@ -446,8 +446,11 @@ Racket. This procedure is useful for typesetting things like
@defproc[(racketvalfont [pre-content pre-content?] ...) element?]{Like
@racket[racketfont], but colored as a value.}
@defproc[(racketresultfont [pre-content pre-content?] ...) element?]{Like
@racket[racketfont], but colored as a REPL result.}
@defproc[(racketresultfont [#:decode? decode? boolean? #t] [pre-content pre-content?] ...) element?]{
Like @racket[racketfont], but colored as a REPL result when @racket[decode?] is
@racket[#t]. When @racket[decode?] is @racket[#f], it also avoids @racket[decode]ing
its argument.
}
@defproc[(racketidfont [pre-content pre-content?] ...) element?]{Like
@racket[racketfont], but colored as an identifier.}