File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,11 @@ Changes can be:
20
20
21
21
* 💫 Assign ` :name ` to every viewer in ` default-viewers `
22
22
23
+ * 🐞 Don't run existing files through ` fs/glob ` , fixes [ #504 ] ( https://github.com/nextjournal/clerk/issues/504 ) . Also improves performance of homepage.
24
+
23
25
* 🐞 Show correct non-var return value for deflike form, fixes [ #499 ] ( https://github.com/nextjournal/clerk/issues/499 )
24
26
27
+
25
28
## 0.14.919 (2023-06-13)
26
29
27
30
* 🚨 Breaking Changes:
Original file line number Diff line number Diff line change 185
185
(if error
186
186
opts
187
187
(->> resolved-paths
188
- (mapcat (partial fs/glob " ." ))
188
+ (mapcat (fn [path] (if (fs/exists? path)
189
+ [path]
190
+ (fs/glob " ." path))))
189
191
(filter (complement fs/directory?))
190
192
(mapv (comp str fs/file))
191
193
(hash-map :expanded-paths )
197
199
#_(expand-paths {:index " book.clj" })
198
200
#_(expand-paths {:paths-fn `clerk-docs})
199
201
#_(expand-paths {:paths-fn `clerk-docs-2})
200
- #_(do (defn my-paths [] [" notebooks/h*.clj" ])
202
+ #_(do (defn my-paths [] [" notebooks/h*.clj" ])§
201
203
(expand-paths {:paths-fn `my-paths}))
202
204
#_(expand-paths {:paths [" notebooks/viewers**" ]})
203
205
Original file line number Diff line number Diff line change 58
58
(builder/expand-paths {:paths [" notebooks/rule_**.clj" ]
59
59
:index (str (fs/file " notebooks" " rule_30.clj" ))}))))
60
60
61
+ (testing " supports absolute paths (#504)"
62
+ (is (= {:expanded-paths [(str (fs/file (fs/cwd ) " book.clj" ))]}
63
+ (builder/expand-paths {:paths [(str (fs/file (fs/cwd ) " book.clj" ))]}))))
64
+
61
65
(testing " invalid args"
62
66
(is (match? {:error #"must set either" }
63
67
(builder/expand-paths {})))
You can’t perform that action at this time.
0 commit comments