mirror of
https://github.com/metosin/reitit.git
synced 2025-12-29 20:58:26 +00:00
Strip slash instead
Also fix the only failing test
This commit is contained in:
parent
2ba01028a0
commit
33582b4c1c
2 changed files with 4 additions and 4 deletions
|
|
@ -33,8 +33,8 @@
|
|||
(defn ensure-slash
|
||||
[^String string]
|
||||
(if (.endsWith string "/")
|
||||
string
|
||||
(str string "/")))
|
||||
(str/replace string #"/+$" "")
|
||||
string))
|
||||
|
||||
(defn walk [raw-routes {:keys [path data routes expand]
|
||||
:or {data [], routes [], expand expand}
|
||||
|
|
|
|||
|
|
@ -230,8 +230,8 @@
|
|||
true [["/a/1/2"]
|
||||
["/*b"]]
|
||||
|
||||
false [["/a"]
|
||||
["/a/"]]
|
||||
true [["/a"]
|
||||
["/a/"]]
|
||||
|
||||
false [["/a"]
|
||||
["/a/1"]]
|
||||
|
|
|
|||
Loading…
Reference in a new issue