-
-
Notifications
You must be signed in to change notification settings - Fork 387
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
Using a space as deilimiter with end: false doesn't match paths that extend it #96
Comments
Thanks. The delimiter was only used for parsing the tokens, not for reconstructing the RegExp from tokens. I'll add it as an option there too. Out of interest, what are you using this for? I didn't expect someone to use it like this, that's for sure 😄 |
I was making a framework for bots for discord (a voice and chat service) and i was using path-to-regexp to match the chat messages, where it's weird to use anything other than spaces to distinguish between parts of the message |
Ok. I'm not sure it'd work so great in that situation because you might have multiple spaces between words and other grammar, right? |
that's possible, but i guess i can just filter out double spaces and the user will know they're talking to a bot so the commands would have to be written correctly |
When creating a regex with
pathToRegexp('test is', keys, { delimiter: ' ', end: false })
the regex doesn't match paths that extend it like:'test is testing'
The text was updated successfully, but these errors were encountered: