hyperoslo / Compass

:earth_africa: Compass helps you setup a central navigation system for your application
http://hyper.no
Other
825 stars 47 forks source link

Fix matching the route #29

Closed onmyway133 closed 8 years ago

onmyway133 commented 8 years ago

Example: we have 2 routes

a:b:{c}
a:b

and a urn a:b, then what route should we match?

Removing optional arguments makes it explicit to declare the route by always matching the number of components

Example: we have 3 routes

a:b:c
a:b:{c}
a:{b}:{c}

and a urn a:b:c, then we should select route a:b:c

This is rare, actually

zenangst commented 8 years ago

@onmyway133 this is very interesting! Great job with the improvements. 😎