-
Notifications
You must be signed in to change notification settings - Fork 97
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
Makes the route resolver pattern compatible with MicroPython's re #67
base: master
Are you sure you want to change the base?
Conversation
Was just going to PR for the same problem... However I don't understand |
When |
works fine, thank you |
Duh! Thank you. I was being daft. |
@@ -54,7 +54,7 @@ def RegisterRoute(handler, method, routePath, name=None) : | |||
if not argName : | |||
raise Exception | |||
argNames.append(argName) | |||
regex += '/([\\w.]*)' | |||
regex += '/([A-Za-z0-9_.]*)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A suggestion here. Can we add support for whitespace as well? In order to support links like
http://example.com/some page
that would be translated from web browsers with a %20
I have tested in CPython to add \s and works but if micropython can't support \w I am not sure how to handle it
MicroPython does not support named classes within
[...]
(i.e. no[\\w]
or[\\s]
)Fixes #38