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 a feature to ignore empty path segments (// in path). #993

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

brotskydotcom
Copy link

When the new ignore-empty-path-segments feature is enabled, multiple leading slashes at the start of the path are ignored (the first segment starts after them), and multiple slashes at the end of any matched segment are ignored (so the next segment starts after them). In addition, the end filter will ignore multiple slashes that follow the final segment. Both the fullpath and tail filters will still return any multiple slashes in their matched text, but their segments iterator will ignore the empty segments (in fact it does this today even without this feature being set).

This change does not include this feature in the list of default features.

This change includes path filter testing on paths with multiple slashes in them.

This change fixes #738.

When the new `ignore-empty-path-segments` feature is enabled, multiple leading slashes at the start of the path are ignored (the first segment starts after them), and multiple slashes at the end of any matched segment are ignored (so the next segment starts after them).  In addition, the `end` filter will ignore multiple slashes that follow the final segment. Both the `fullpath` and `tail` filters will still return any multiple slashes in their matched text, but their `segments` iterator will ignore the empty segments (in fact it does this today even without this feature being set).

This change does _not_ include this feature in the list of default features.

This change includes path filter testing on paths with multiple slashes in them.

This change fixes seanmonstar#738.
@brotskydotcom
Copy link
Author

@seanmonstar This PR does not update docs. If you are interested in merging it but need me to write docs first just let me know. All review comments appreciated.

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.

path with an extra initial /
1 participant