diff --git a/modules/reitit-core/src/reitit/core.cljc b/modules/reitit-core/src/reitit/core.cljc index 9f88600a..0bdeb7ab 100644 --- a/modules/reitit-core/src/reitit/core.cljc +++ b/modules/reitit-core/src/reitit/core.cljc @@ -30,6 +30,12 @@ nil (expand [_ _])) +(defn ensure-slash + [^String string] + (if (.endsWith string "/") + string + (str string "/"))) + (defn walk [raw-routes {:keys [path data routes expand] :or {data [], routes [], expand expand} :as opts}]