Regex in paths are not working with pathFor
Closed this issue · 3 comments
Comming from IRonRouter, I'm trigin to migrate to flow router.
I've a working route which is quite general with regex like this:
'/:collection(views|sources|users|features)/:slug([0-9a-zA-Z]{16,20})?'
Looks complex but it works and allow me to use a common route for different collections and cases.
But with flow router, pathFor is not working anymore, for instance {{pathFor 'collections' collection='features' slug='5uqmtu3FKMJ47yqzi'}}
will return /features|sources|users|features)/5uqmtu3FKMJ47yqzi{16,20})?
Which is not the expected behaviour according to the path-to-regexp documentation.
Looks like regex are not working with flow router?
Is flow router have a distinct way of using regex in paths?
I'm on linux, Firefox, Meteor 1.10.2
Hello @SDaron ,
This package doesn't support regexp as a path.
But, I'd like to keep this as open feature request for next major v4 release.
All right, thanks for your answer.
closing as solved