scribble-code-examples
(require scribble-code-examples) | |
package: scribble-code-examples |
procedure
(code-examples #:lang language #:context context [ #:inset? inset? #:show-lang-line show-lang-line #:eval evaluator] examples ...) → block? language : string? context : syntax? inset? : boolean? = #true show-lang-line : (or/c boolean? pre-flow?) = #false evaluator : evaluator? = (make-code-eval #:lang language) examples : string?
@code-examples[#:lang "at-exp racket" #:context #'here]|{ |
(+ 1 2) |
@+[1 3] |
}| |
@code-examples[#:lang "at-exp racket" #:context #'here]|{ |
(require scribble-code-examples (for-label racket/base)) |
@code-examples[#:lang "at-exp racket" #:context #'here]|{ |
(+ 1 2) |
@+[1 3] |
}| |
}| |
>
(require scribble-code-examples (for-label racket/base)) file-exists?: `exists' access denied for /System/Library/Frameworks/Foundation.framework/Foundation.so context...: /home/racket/build-pkgs/racket/collects/ffi/../racket/private/map.rkt:113:23: loop /home/racket/build-pkgs/racket/collects/ffi/unsafe.rkt:117:0: get-ffi-lib10 /home/racket/build-pkgs/racket/collects/ffi/unsafe/nsalloc.rkt: [running body] /home/racket/build-pkgs/racket/collects/planet/private/resolver.rkt: [traversing imports]
>
@code-examples[#:lang "at-exp racket" #:context #'here]|{ (+ 1 2) @+[1 3] }| code-examples: undefined; cannot reference an identifier before its definition in module: 'anonymous-module context...: /home/racket/build-pkgs/racket/share/pkgs/sandbox-lib/racket/sandbox.rkt:379:0: call-with-limits
procedure
(make-code-eval #:lang language) → evaluator?
language : string?
>
(require scribble-code-examples) file-exists?: `exists' access denied for /System/Library/Frameworks/Foundation.framework/Foundation.so context...: /home/racket/build-pkgs/racket/collects/ffi/../racket/private/map.rkt:113:23: loop /home/racket/build-pkgs/racket/collects/ffi/unsafe.rkt:117:0: get-ffi-lib10 /home/racket/build-pkgs/racket/collects/ffi/unsafe/nsalloc.rkt: [running body] /home/racket/build-pkgs/racket/collects/net/http-client.rkt: [traversing imports]
>
(define ev (make-code-eval #:lang "racket")) make-code-eval: undefined; cannot reference an identifier before its definition in module: 'anonymous-module context...: /home/racket/build-pkgs/racket/share/pkgs/sandbox-lib/racket/sandbox.rkt:379:0: call-with-limits
>
(ev '(+ 1 2)) ev: undefined; cannot reference an identifier before its definition in module: 'anonymous-module context...: /home/racket/build-pkgs/racket/share/pkgs/sandbox-lib/racket/sandbox.rkt:379:0: call-with-limits
>
(ev "(+ 1 2)") ev: undefined; cannot reference an identifier before its definition in module: 'anonymous-module context...: /home/racket/build-pkgs/racket/share/pkgs/sandbox-lib/racket/sandbox.rkt:379:0: call-with-limits