scribble/comment-reader doc tweaks
original commit: ec30c8c2545e995770fe6d35896b91d08bddec74
This commit is contained in:
parent
a93ee701fd
commit
6d992d7a2f
|
@ -416,25 +416,34 @@ because the @"@"-reader would drop comments within the
|
|||
@racket[racketblock] before giving
|
||||
@racketmodname[scribble/comment-reader] a chance to convert them.
|
||||
|
||||
@racketmodname[scribble/comment-reader] uses @racket[unsyntax] to
|
||||
The implementation of @racketmodname[scribble/comment-reader] uses @racket[unsyntax] to
|
||||
typeset comments. When using @racketmodname[scribble/comment-reader]
|
||||
with, for instance, @racket[RACKETBLOCK], which specifies
|
||||
@racket[UNSYNTAX] as @racket[escape-id], this causes problems. You can
|
||||
pass a new @racket[escape-id] for
|
||||
@racketmodname[scribble/comment-reader] by using @racket[#:escape-id]:
|
||||
with, for instance, @racket[RACKETBLOCK], @racket[unsyntax] does not escape,
|
||||
since @racket[RACKETBLOCK] uses @racket[UNSYNTAX] as its escape form. You can
|
||||
declare an escape identifier for
|
||||
@racketmodname[scribble/comment-reader] with @racket[#:escape-id]. For example,
|
||||
|
||||
@verbatim[#:indent 2]|{
|
||||
@#reader scribble/comment-reader #:escape-id UNSYNTAX
|
||||
(RACKETBLOCK
|
||||
(define-syntax (m syn)
|
||||
(syntax-case syn ()
|
||||
(define-syntax (m stx)
|
||||
(syntax-case stx ()
|
||||
[(_ x)
|
||||
;; Well this was silly
|
||||
#`(#,x)]))
|
||||
)
|
||||
}|
|
||||
|
||||
generates
|
||||
|
||||
@#reader scribble/comment-reader #:escape-id UNSYNTAX
|
||||
(RACKETBLOCK
|
||||
(define-syntax (m stx)
|
||||
(syntax-case stx ()
|
||||
[(_ x)
|
||||
;; Well this was silly
|
||||
#`(#,x)]))
|
||||
)
|
||||
|
||||
@; ------------------------------------------------------------------------
|
||||
@subsection{Code Fonts and Styles}
|
||||
|
|
Loading…
Reference in New Issue
Block a user