We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c3399f commit fca5265Copy full SHA for fca5265
src/clj/cljs/repl.clj
@@ -936,10 +936,13 @@ itself (not its value) is returned. The reader macro #'x expands to (var x)."}})
936
937
Example: (source-fn 'filter)"
938
[env x]
939
- (when-let [v (ana/resolve-var env x)]
+ (when-let [v (ana-api/resolve env x)]
940
(when-let [filepath (:file v)]
941
- (let [f (io/file filepath)]
942
- (when (.exists f)
+ (let [f (io/file filepath)
+ f (if (.exists f)
943
+ f
944
+ (io/resource filepath))]
945
+ (when f
946
(with-open [pbr (PushbackReader. (io/reader f))]
947
(let [rdr (readers/source-logging-push-back-reader pbr)]
948
(dotimes [_ (dec (:line v))] (readers/read-line rdr))
0 commit comments