bkyk8rc3zvpnsf5inmcqq4n3k98cv6hj-my-site-hyper-literate-git.test.suzanne.soy-0.0.1

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 548627c40485ff0d688418296dcffcdfcb0016d7
parent 2c0f9c948021e9b3787ff54cee92ba08701cf332
Author: Matthew Flatt <mflatt@racket-lang.org>
Date:   Tue,  1 May 2012 14:47:44 -0600

scribble/eval: change string or byte-string expression handling

Use `datum->syntax' instead of `begin' to protect the string or byte
string. Danny Yoo suggested this change.

original commit: 23296615ec7cddb34257486b62094048b085ff6e

Diffstat:
Mcollects/scribble/eval.rkt | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/collects/scribble/eval.rkt b/collects/scribble/eval.rkt @@ -372,8 +372,10 @@ (syntax-case s (module) [(module . _rest) (syntax->datum s)] [_else s])] - [(bytes? s) `(begin ,s)] - [(string? s) `(begin ,s)] + ;; a sandbox treats strings and byte strings as code + ;; streams, so protect them as syntax objects: + [(string? s) (datum->syntax #f s)] + [(bytes? s) (datum->syntax #f s)] [else s])))) list)))