Skip to content

Strip content of regexes from path before sorting#14

Merged
troch merged 1 commit intotroch:masterfrom
dgieselaar:strip-regex-before-sort
Oct 15, 2017
Merged

Strip content of regexes from path before sorting#14
troch merged 1 commit intotroch:masterfrom
dgieselaar:strip-regex-before-sort

Conversation

@dgieselaar
Copy link
Copy Markdown
Contributor

When a regex contains a question mark (for instance, for an optional parameter, a negative lookahead, or a non-capturing group), the children of the route are not correctly sorted anymore, because they're cut off at the first question mark. This change removes the content of the regex before sorting.

Additionally, I've changed the test command to ensure it runs on Windows as well.

@dgieselaar dgieselaar force-pushed the strip-regex-before-sort branch from 8683210 to 11de007 Compare October 10, 2017 14:22
@troch
Copy link
Copy Markdown
Owner

troch commented Oct 15, 2017

Great find, going to merge and release. I'll probably re-visit the sorting solution at some point so that the number of segments comes from path-parser. But will do for now 👍

@troch troch merged commit 0166747 into troch:master Oct 15, 2017
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.

2 participants