-
Notifications
You must be signed in to change notification settings - Fork 476
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
segment should remove all trailing/leading slashes #253
Conversation
@@ -1553,6 +1553,7 @@ | |||
var path = this.path(); | |||
var absolute = path.substring(0, 1) === '/'; | |||
var segments = path.split(separator); | |||
var noLeadTrailSlashRegex = /^\/*|\/*$/g; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't that be /^\/+|\/+$/g;
(+
(one or more) instead of *
(zero or more))?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes you are right, I'll fix this
ping @orlando :) |
@rodneyrehm PR updated |
fix(segment): trimming leading and trailing slashes from input
thank you very much! :) |
released in v1.17.0 |
🔥 |
Description
This PR removes leading and trailing slashes from
segment
Fixes #236