Please sign in to comment.
Improve the sorting algorithm for routing
If one route is an explicit substring of another, prefer the longer one. Otherwise, if one of the routes has a dynamic segment, prefer the route without the dynamic segment. Otherwise, prefer the longer one. This fixes posts/:post_id being preferred over posts/new. Eventually, we should prebuild the match tree.
- Loading branch information...
Showing with 15 additions and 0 deletions.