Url token Keywords with Hyphens
AdamFrey opened this issue · 3 comments
AdamFrey commented
Hi,
In the README, there is an example:
(def routes
[["/auth/login" :auth/login]
["/auth/recovery/token/:token" :auth/recovery]
["/workspace/:project-uuid/:page-uuid" :workspace/page]])
but I've found that bide
doesn't currently work with hyphenated keywords like :project-uuid
and :page-uuid
. so:
(r/match router "/workspace/abc/def")
=> nil
Avoiding hyphenated keywords seems to do what we want.
(def routes
[...
["/workspace/:projectuuid/:pageuuid" :workspace/page]])
(r/match router "/workspace/abc/def")
=> [:workspace/page {:projectuuid "abc", :pageuuid "def"}]
I'm assuming you want bide to be able to use hyphenated url keywords, so I think you'll have to change the parser regex.
niwinz commented
many thanks! I'll fix it asap
niwinz commented
Fixed and released 1.0.6
AdamFrey commented
Thank you!