scribble icon indicating copy to clipboard operation
scribble copied to clipboard

scribble/example does not preserve syntax properties

Open lexi-lambda opened this issue 8 years ago • 1 comments

examples from scribble/example does not preserve the 'paren-shape syntax property, and presumably drops other syntax properties as well. Given the following program:

#lang scribble/manual
@(require scribble/example)
@(examples (syntax-property #'[1 2 3] 'paren-shape))

…it produces the following output:

> (syntax-property #'[1 2 3] 'paren-shape)
#f

This is not due to scribble/manual, because the following program works as expected:

@(println (syntax-property #'[1 2 3] 'paren-shape))
; => #\[

lexi-lambda avatar Jan 20 '17 18:01 lexi-lambda

After doing some digging (with the intent to possibly come up with a fix), I found a workaround that seems to work well enough for me to use it without implementing a fix and worry about dealing with older versions of Racket: using the #:preserve-source-locations option preserves syntax-original?-ness and 'paren-shape (though, strangely, not other syntax properties).

lexi-lambda avatar Aug 18 '17 04:08 lexi-lambda