veliovgroup / flow-router

🚦 Carefully extended flow-router for Meteor
https://packosphere.com/ostrio/flow-router-extra
BSD 3-Clause "New" or "Revised" License
201 stars 30 forks source link

Regex in paths are not working with pathFor #77

Closed SDaron closed 7 months ago

SDaron commented 4 years ago

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

dr-dimitru commented 4 years ago

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.

SDaron commented 4 years ago

All right, thanks for your answer.

dr-dimitru commented 7 months ago

closing as solved