-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Version
5.0.3
Reproduction link
Steps to reproduce
-
Update your version of vue-router to 5.0.3.
-
Use a custom regex to define i.e. an id in a route as a digit
Try example in version 5.0.3:
definePage({
path: "/pathxyz/:id(\\d+)",
});
(In version 5.0.2 this still works.)
- If you have a catch all page, you'll end up there.
If you use the following instead in version 5.0.3, it will work:
definePage({
path: "/pathxyz/:id([0-9]+)",
});
But I think, that this is at least just a workaround. Or you stay at version 5.0.2 ...
What is expected?
Custom regex is working. You get the desired route and page.
What is actually happening?
Custom regex seems to fail because you fall into the catch all page. I think, the backslashes get lost.
I refer to this point in the Vue Router docs: https://router.vuejs.org/guide/essentials/route-matching-syntax.html#Custom-regex-in-params
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels