You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that a * pattern only matches inside of slashes, it cannot actually match slashes. This is consistent with filesystem globs, so it is not really surprising. I do not want to abuse the NotFound route handler to match stuff, partly because that's just wrong, but also because it would prevent me from havingan even lower precedence route that matches articles: /:article-slug.
As far as I can tell, this would require a new feature - something like the ** shell glob operator that matches deep paths. Is this necessary? If so, is it desirable, and are there any special cases that I should be aware of while working on a PR? It looks like there are some special rules around the . character, after reading through #142.
The text was updated successfully, but these errors were encountered:
You're using an old version of the router. In 1.0 (currently rc1) you can use * to match "all characters (non-greedy) up to the next character in the pattern, or to the end of the URL if there is none". There's no way to do this elegantly in the 0.13 API.
In my app, I have a category page that handles routes like
I would like to match all of these with a single route handler, after matching higher precedence routes like
/login
and/edit
. Something like:It seems that a
*
pattern only matches inside of slashes, it cannot actually match slashes. This is consistent with filesystem globs, so it is not really surprising. I do not want to abuse theNotFound
route handler to match stuff, partly because that's just wrong, but also because it would prevent me from havingan even lower precedence route that matches articles:/:article-slug
.As far as I can tell, this would require a new feature - something like the
**
shell glob operator that matches deep paths. Is this necessary? If so, is it desirable, and are there any special cases that I should be aware of while working on a PR? It looks like there are some special rules around the.
character, after reading through #142.The text was updated successfully, but these errors were encountered: