From 1f5419d10c4e768e843e90ba0738fac5fa558aca Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 22 Jun 2020 08:07:20 -0600 Subject: [PATCH] fix color on quasiauoted hash tables --- scribble-lib/scribble/racket.rkt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scribble-lib/scribble/racket.rkt b/scribble-lib/scribble/racket.rkt index 6ca2ee91..8b80a3f9 100644 --- a/scribble-lib/scribble/racket.rkt +++ b/scribble-lib/scribble/racket.rkt @@ -721,7 +721,9 @@ ((loop init-line! quote-depth first-expr? #f) (car l) srcless-step) (lloop (cdr l) expr? #f 1)] [(forced-pair? l) - ((loop init-line! quote-depth first-expr? #f) (forced-pair-car l) srcless-step) + ;; forced pairs are for hash tables, where the `car` cannot be + ;; unquoted: use +inf.0 for `quote-depth` + ((loop init-line! +inf.0 first-expr? #f) (forced-pair-car l) srcless-step) (lloop (forced-pair-cdr l) expr? #t 1)] [(mpair? l) ((loop init-line! quote-depth first-expr? #f) (mcar l) srcless-step) @@ -774,7 +776,7 @@ [orig-col src-col]) (set! src-col (+ src-col delta)) (hash-set! next-col-map src-col dest-col) - ((loop init-line! (if expr? quote-depth +inf.0) expr? (and expr? (zero? quote-depth))) + ((loop init-line! quote-depth expr? (and expr? (zero? quote-depth))) (let*-values ([(l) (sort (hash-map (syntax-e c) cons) (lambda (a b) (< (or (syntax-position (cdr a)) -inf.0)