Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/orchard/spec.clj
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,13 @@
[(str kw)])))))
sort)]
(if (not-empty filter-regex)
(filter (fn [spec-symbol-str]
(let [checkable-part (if (.startsWith ^String spec-symbol-str ":")
(subs spec-symbol-str 1)
spec-symbol-str)]
(re-find (re-pattern filter-regex) checkable-part)))
sorted-specs)
(let [pattern (re-pattern filter-regex)]
(filter (fn [spec-symbol-str]
(let [checkable-part (if (.startsWith ^String spec-symbol-str ":")
(subs spec-symbol-str 1)
spec-symbol-str)]
(re-find pattern checkable-part)))
sorted-specs))
sorted-specs))))

(defn get-multi-spec-sub-specs
Expand Down