From bc29f1ca3cfbb4fdad42283693e6b3fd988303d6 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 11 Apr 2010 16:55:18 +0000 Subject: [PATCH] module paths normalize to .rkt, load handler converts .rkt back to .ss if necessary svn: r18788 original commit: bdb71498e3ed816d44c9faf830f97fbe9fdaa3f2 --- collects/scribble/extract.ss | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/collects/scribble/extract.ss b/collects/scribble/extract.ss index 66380c78..679b8042 100644 --- a/collects/scribble/extract.ss +++ b/collects/scribble/extract.ss @@ -23,7 +23,15 @@ [else c])) (define-for-syntax (extract orig-path stx) - (let ([path (resolve-path-spec orig-path orig-path stx)]) + (let* ([n-path (resolve-path-spec orig-path orig-path stx)] + [path (if (regexp-match? #rx#"[.]rkt$" (path->bytes n-path)) + (if (file-exists? n-path) + n-path + (let ([ss (path-replace-suffix n-path #".ss")]) + (if (file-exists? ss) + ss + n-path))) + n-path)]) (let ([s-exp (parameterize ([current-namespace (make-base-namespace)] [read-accept-reader #t]