File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed
Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 408408
409409(defn normalize-filename [f]
410410 (if (fs/windows? )
411- (-> f fs/normalize fs /unixify)
411+ (-> f fs/normalize utils /unixify)
412412 f))
413413
414414(defn ns->jar [ns ]
456456 " jar" (first (str/split (.getPath resource) #"!" ))
457457 " file" (str resource))]
458458 (-> resource-file java.net.URI. io/file str))))
459- fs /unixify)))
459+ utils /unixify)))
460460
461461#_(var->location #'inc)
462462#_(var->location #'var->location)
550550 (let [jar? (or (nil? source)
551551 (str/ends-with? source " .jar" ))
552552 gitlib-hash (and (not jar?)
553- (second (re-find #".gitlibs/libs/.*/(\b [0-9a-f]{5,40}\b )/" (fs /unixify source))))]
553+ (second (re-find #".gitlibs/libs/.*/(\b [0-9a-f]{5,40}\b )/" (utils /unixify source))))]
554554 (if (or jar? gitlib-hash)
555555 (update g :->analysis-info merge (into {} (map (juxt identity
556556 (constantly (if source
Original file line number Diff line number Diff line change 22 " Clerk's paths expansion and paths-fn handling."
33 (:require [babashka.fs :as fs]
44 [clojure.edn :as edn]
5- [clojure.string :as str])
5+ [clojure.string :as str]
6+ [nextjournal.clerk.utils :as utils])
67 (:import [java.net URL]))
78
89(defn ^:private ensure-not-empty [build-opts {:as opts :keys [error expanded-paths]}]
130131 (fs/exists? file))
131132 (let [rel (fs/relativize (fs/cwd ) (fs/canonicalize file #{:nofollow-links }))]
132133 (when-not (str/starts-with? (str rel) " .." )
133- (fs /unixify rel)))))
134+ (utils /unixify rel)))))
134135
135136#_(path-in-cwd " notebooks/rule_30.clj" )
136137#_(path-in-cwd " /tmp/foo.clj" )
Original file line number Diff line number Diff line change 11(ns nextjournal.clerk.utils
2- (:require [alphabase.base58 :as base58]))
2+ (:require [alphabase.base58 :as base58]
3+ [clojure.string :as str]))
34
45(def bb? (System/getProperty " babashka.version" ))
56
2324
2425(defn ->base58 [x]
2526 (base58/encode x))
27+
28+ (defn unixify [x]
29+ (str/replace (str x) " \\ " " /" ))
You can’t perform that action at this time.
0 commit comments