Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
crimeminister committed Aug 14, 2024
1 parent b4d2bfc commit 24f193e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions codox/src/codox/main.clj
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@
(symbol? pattern) (= pattern (symbol ns-name))))

(defn- filter-namespaces [namespaces ns-filters]
;; tools.deps users can't include a regex literal in deps.edn files. If we get a string as a
;; namespace filter, convert it to a regular expression.
(let [ns-filters (mapv (fn [ns-filter] (if (string? ns-filter)
(re-pattern ns-filter)
ns-filter))
ns-filters)]
(if (and ns-filters (not= ns-filters :all))
(filter #(some (partial ns-matches? %) ns-filters) namespaces)
namespaces)))
(if (and ns-filters (not= ns-filters :all))
;; tools.deps users can't include a regex literal in deps.edn files. If we get a string as a
;; namespace filter, convert it to a regular expression.
(let [ns-filters (mapv (fn [ns-filter] (if (string? ns-filter)
(re-pattern ns-filter)
ns-filter))
ns-filters)]
(filter #(some (partial ns-matches? %) ns-filters) namespaces))
namespaces))

(defn- read-namespaces
[{:keys [language root-path source-paths namespaces metadata exclude-vars] :as opts}]
Expand Down

0 comments on commit 24f193e

Please sign in to comment.