How to specify "?" for url-patterns as querystring and not "optional match" #414
Unanswered
iambumblehead
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Please give advice or recommendation for handling the "?" character, where it is found in a querystring such as "/the/path?the=query#the-hash".
The context is this PR, where sources using older
[email protected]were updated to use[email protected]. When using latest[email protected], the tests failed if path-to-regexp was called on a url with querystring,The guide at
https://git.new/pathToRegexpErrorgives this advice, "For optional (?), use braces: /file{.:ext}." so the "solution" at the PR was this,The solution at the PR seems wrong, however, as the url is not using "?" to specify an "optional match" but it is just there as part of the url querystring.
Thank you for this library and thank you in advance for any advice.
Beta Was this translation helpful? Give feedback.
All reactions