From d7b656e884546d1b498db2b2a476df1254f978b4 Mon Sep 17 00:00:00 2001 From: Asko Nõmm Date: Sun, 3 Oct 2021 13:01:48 -0300 Subject: Fix issue with regex parsing --- src/ruuter/core.cljc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/ruuter/core.cljc') diff --git a/src/ruuter/core.cljc b/src/ruuter/core.cljc index 0da46b6..8052d36 100644 --- a/src/ruuter/core.cljc +++ b/src/ruuter/core.cljc @@ -24,8 +24,7 @@ :else ; what comes around, goes around %)) - (string/join "\\/") - (re-pattern)))) + (string/join "\\/")))) (defn- path+uri->path-params @@ -62,7 +61,7 @@ (let [route (->> routes (filter #(not (= :not-found (:path %)))) (map #(merge % {:regex-path (path->regex-path (:path %))})) - (filter #(and (re-matches (:regex-path %) uri) + (filter #(and (re-matches (re-pattern (:regex-path %)) uri) (= (:method %) request-method))) first)] (when route -- cgit v1.2.3