Closed jvailius closed 1 year ago
/
has special treatment as a separating character in the pathname component, but not in the hash (where / has special meaning only for libraries that choose to treat it that way).
As one workaround, you can use a regex group, like so:
const pattern = new URLPattern('/#/books/:id([^/]+)', 'http://example.com');
pattern.test("http://example.com/#/books/1/page/0") // false
Hi, does someone know if there a particular reason for this behavior: The path is (correctly I guess) not matched but the hash is.
Thank you.
Tested with Google Chrome 117.0.5938.149 (Official Build) (64-bit)