Sorry for the title, I don't know how to describe this problem clearly.
This is probably related to #17. The case can be demonstrated by this test:
it('should able to match longer subpath that has similar path on the root', ( ) => {
const node = new RouteNode('', '', [
new RouteNode('a', '/:x/:y'),
new RouteNode('b', '/', [
new RouteNode('c', 'a/b/c'),
]),
]);
withoutMeta(node.matchPath('/a/b/c')).should.eql({ name: 'c', params: { } });
});
matchPath will return {} even though there is a route for /a/b/c
Sorry for the title, I don't know how to describe this problem clearly.
This is probably related to #17. The case can be demonstrated by this test:
matchPath will return
{}
even though there is a route for /a/b/c