Skip to content

Add support for optional middle segments#179

Open
Riimu wants to merge 1 commit intonikic:masterfrom
Riimu:master
Open

Add support for optional middle segments#179
Riimu wants to merge 1 commit intonikic:masterfrom
Riimu:master

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