matchit
matchit copied to clipboard
Better support for overlapping parameters
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.