diff --git a/pollen/private/file-utils.rkt b/pollen/private/file-utils.rkt index 879f9ef..0836b37 100644 --- a/pollen/private/file-utils.rkt +++ b/pollen/private/file-utils.rkt @@ -259,26 +259,25 @@ (check-equal? (->markdown-source-paths "foo") (list (->path "foo.pmd"))) (check-equal? (->markdown-source-paths 'foo) (list (->path "foo.pmd")))) - - - -(define+provide (get-source path) - #;(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))) +(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))]) + (proc p))) ;; for backward compatibility (define+provide ->source-path get-source) -(define+provide (->output-path x) - #;(coerce/path? . -> . coerce/path?) - (cond - [(or (markup-source? x) (preproc-source? x) (null-source? x) (markdown-source? x)) - (define output-path (unescape-ext (remove-ext x))) - (if (has-poly-ext? output-path) - (add-ext (remove-ext output-path) (or (current-poly-target) (car (setup:poly-targets)))) - output-path)] - [(scribble-source? x) (add-ext (remove-ext x) 'html)] - [else x])) +(define+provide (->output-path pathish) + (define p (->path pathish)) + (->path + (cond + [(or (markup-source? p) (preproc-source? p) (null-source? p) (markdown-source? p)) + (define output-path (unescape-ext (remove-ext p))) + (if (has-poly-ext? output-path) + (add-ext (remove-ext output-path) (or (current-poly-target) (car (setup:poly-targets)))) + output-path)] + [(scribble-source? p) (add-ext (remove-ext p) 'html)] + [else p]))) (define+provide (project-files-with-ext ext) diff --git a/pollen/private/ts.rktd b/pollen/private/ts.rktd index 65055ba..ecf0e2f 100644 --- a/pollen/private/ts.rktd +++ b/pollen/private/ts.rktd @@ -1 +1 @@ -1559943526 +1559944660