The /\{([^}]+)\}/g regexp that's widely used in the router's implementation allows spaces in param names and types, as well as before or after the colon.
However, the rest of the code is not prepared for spaces within the type names: trying to match the route /posts/{id: Int} will fail trying to look for a " Int" type within the known types...
Happy to open a PR to change that, however I'm wondering how you'd treat the issue:
Personally, I'd vote for the former, as that'd make it easier to have a single way of doing things, and who wants a /route/{my param: Int} anyway?
Personally, I'd vote for the former
100% agree with you.
As a new learner, I'd say my vote is for the former, as well. Spaces don't seem natural in a URL, so disallowing them seems natural, too.
Agreed. No spaces!
Perfect then, I鈥檒l start a PR ASAP!
@olance no pressure or rush here, but checking in to see if the PR did get started. Just didn鈥檛 want this one to get lost or remain open if fix is already complete.
@thedavidprice yeah sorry work as been crazier recently so didn't have time for Redwood 馃槙
But I'm still planning on pushing a PR! Hopefully this week-end 馃