correction

dev-render-audit
Matthew Butterick 5 years ago
parent 6d63bc020e
commit f0554d1d60

@ -259,26 +259,25 @@
(check-equal? (->markdown-source-paths "foo") (list (->path "foo.pmd"))) (check-equal? (->markdown-source-paths "foo") (list (->path "foo.pmd")))
(check-equal? (->markdown-source-paths 'foo) (list (->path "foo.pmd")))) (check-equal? (->markdown-source-paths 'foo) (list (->path "foo.pmd"))))
(define+provide (get-source pathish)
(define p (->path pathish))
(for/or ([proc (in-list (list get-markup-source get-markdown-source get-preproc-source get-null-source get-scribble-source))])
(define+provide (get-source path) (proc p)))
#;(coerce/path? . -> . (or/c #f path?))
(ormap (λ (proc) (proc path)) (list get-markup-source get-markdown-source get-preproc-source get-null-source get-scribble-source)))
;; for backward compatibility ;; for backward compatibility
(define+provide ->source-path get-source) (define+provide ->source-path get-source)
(define+provide (->output-path x) (define+provide (->output-path pathish)
#;(coerce/path? . -> . coerce/path?) (define p (->path pathish))
(cond (->path
[(or (markup-source? x) (preproc-source? x) (null-source? x) (markdown-source? x)) (cond
(define output-path (unescape-ext (remove-ext x))) [(or (markup-source? p) (preproc-source? p) (null-source? p) (markdown-source? p))
(if (has-poly-ext? output-path) (define output-path (unescape-ext (remove-ext p)))
(add-ext (remove-ext output-path) (or (current-poly-target) (car (setup:poly-targets)))) (if (has-poly-ext? output-path)
output-path)] (add-ext (remove-ext output-path) (or (current-poly-target) (car (setup:poly-targets))))
[(scribble-source? x) (add-ext (remove-ext x) 'html)] output-path)]
[else x])) [(scribble-source? p) (add-ext (remove-ext p) 'html)]
[else p])))
(define+provide (project-files-with-ext ext) (define+provide (project-files-with-ext ext)

@ -1 +1 @@
1559943526 1559944660

Loading…
Cancel
Save