From cc712d16e4ac61a4f6453f9fa3de3fb9038c6f04 Mon Sep 17 00:00:00 2001 From: Dmitry Vasilyanov Date: Sat, 5 May 2018 11:33:20 +0300 Subject: [PATCH 1/2] fix sorting in (find-processable-file-paths) The (parse-ns) function always returns a string, so this code: (sort-by #(->> % parse-ns second)) actually sorts by the second character of the string. Seems like this (second) call is a rudiment from the past. And this commit removes it, and thus fixes the sorting. --- src/marginalia/core.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/marginalia/core.clj b/src/marginalia/core.clj index 4453d5282..b4280747b 100644 --- a/src/marginalia/core.clj +++ b/src/marginalia/core.clj @@ -95,7 +95,7 @@ (->> (io/file dir) (file-seq) (filter (partial processable-file? pred)) - (sort-by #(->> % parse-ns second)) + (sort-by parse-ns second) (map #(.getCanonicalPath %)))) ;; ## Project Info Parsing From ff3339f9b491f075de1e6100dd7e65eab94373ca Mon Sep 17 00:00:00 2001 From: Dmitry Vasilyanov Date: Sun, 6 May 2018 12:30:23 +0300 Subject: [PATCH 2/2] remove extra `(second)` call, a mistake I made in previous commit Sorry for that. I discovered that I made a mistake only after I pushed to github, so now I have to make a separate commit that fixes the mistake in previous commit (instead of merging both commits into one). --- src/marginalia/core.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/marginalia/core.clj b/src/marginalia/core.clj index b4280747b..931d93fe0 100644 --- a/src/marginalia/core.clj +++ b/src/marginalia/core.clj @@ -95,7 +95,7 @@ (->> (io/file dir) (file-seq) (filter (partial processable-file? pred)) - (sort-by parse-ns second) + (sort-by parse-ns) (map #(.getCanonicalPath %)))) ;; ## Project Info Parsing