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

Add support for optional middle segments #179

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Riimu
Copy link

@Riimu Riimu commented Apr 17, 2019

Looking at the source, I thought the limitation of allowing optional parts only in the end of the route definition was rather arbitrary and made some route definitions much more complex than they needed to be.

This PR rewrites the parsing logic for optional parts in order to allow optional parts in the middle of routes, instead of just allowing them in the end.

I tried to maintain as high compatibility with the existing parsing logic failures as possible to avoid unnecessary backwards compatibility breaks while allowing new behavior.

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

Successfully merging this pull request may close these issues.

1 participant