Skip to content

Treat repeating slashes as pathless paths#13

Merged
troch merged 1 commit intotroch:masterfrom
dgieselaar:dgieselaar-repeating-slashes
Oct 5, 2017
Merged

Treat repeating slashes as pathless paths#13
troch merged 1 commit intotroch:masterfrom
dgieselaar:dgieselaar-repeating-slashes

Conversation

@dgieselaar
Copy link
Copy Markdown
Contributor

As discussed in router5/router5#200, this PR implements support for repeating slashes in paths as a pseudo-implementation of pathless paths. Two changes were made:

  • strip repeating slashes in buildPath
  • when matching paths, if the previously consumed path was a slash, and the current path is a slash as well, prepend a slash to segmentPath.

@troch
Copy link
Copy Markdown
Owner

troch commented Oct 3, 2017

Thanks for the PR, I'll review it shortly

@troch
Copy link
Copy Markdown
Owner

troch commented Oct 5, 2017

I like your solution to track what was just consumed, it makes it safe 👍

@troch troch merged commit 4a8a41f into troch:master Oct 5, 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