From 923eba8839aef84d27657d2e2c9e602dcb6a95e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Tue, 27 Dec 2016 19:11:32 +0100 Subject: [PATCH] Allow whole s-expressions to change the way they are rendered, using the scribble-render syntax property --- racket.rkt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/racket.rkt b/racket.rkt index 82cc18f1..46e03a95 100644 --- a/racket.rkt +++ b/racket.rkt @@ -1005,6 +1005,9 @@ (let ([slv (and (identifier? v) (syntax-local-value v (lambda () #f)))]) (cond + [(and (syntax? v) (syntax-property v 'scribble-render)) + => (λ (renderer) + (wrap-loc v #f (renderer v)))] [(variable-id? slv) (wrap-loc v #f `(,#'make-var-id ',(variable-id-sym slv)))] [(element-id-transformer? slv)