Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling double slashes #128

Open
aui opened this issue Jan 25, 2024 · 0 comments
Open

Handling double slashes #128

aui opened this issue Jan 25, 2024 · 0 comments

Comments

@aui
Copy link

aui commented Jan 25, 2024

Thank you very much for this library, it makes my router program elegant!

I discovered a phenomenon during use: it has some deviations from chrome’s native URLPattern behavior. I’m not sure if it’s a BUG. The test examples are as follows:

var x = new URLPattern({ pathname: '/' });
console.log(x.exec({ pathname: '//foo' }));

Chrome or Deno:

null

URLPattern polyfill:

{inputs: [Object {pathname: "//foo"}], protocol: Object {input: "", groups: Object {0: ""}}, …}

The above results are from urlpattern-polyfill@9.0.0 and urlpattern-polyfill@10.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant