matchit icon indicating copy to clipboard operation
matchit copied to clipboard

Better support for overlapping parameters

Open ibraheemdev opened this issue 4 years ago • 0 comments

Currently routes like /:a/:b and /:a are supported, but only if they have a common prefix (/:a). This means a route like /:a/:b conflicts with /:c. We can support this by normalizing route parameters positionally when they are first inserted. /:user/:id would become /:a/:b, and /:id becomes /:a. Param nodes get an additional field representing the user-defined parameter name, which is used to construct the parameter list.

ibraheemdev avatar Dec 30 '21 19:12 ibraheemdev