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

segment should remove all trailing/leading slashes #253

Merged
merged 1 commit into from
Oct 5, 2015
Merged

segment should remove all trailing/leading slashes #253

merged 1 commit into from
Oct 5, 2015

Conversation

orlando
Copy link
Contributor

@orlando orlando commented Sep 29, 2015

Description

This PR removes leading and trailing slashes from segment

Fixes #236

@@ -1553,6 +1553,7 @@
var path = this.path();
var absolute = path.substring(0, 1) === '/';
var segments = path.split(separator);
var noLeadTrailSlashRegex = /^\/*|\/*$/g;
Copy link
Member

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))?

Copy link
Contributor Author

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

@rodneyrehm
Copy link
Member

ping @orlando :)

@orlando
Copy link
Contributor Author

orlando commented Oct 5, 2015

@rodneyrehm PR updated

rodneyrehm added a commit that referenced this pull request Oct 5, 2015
fix(segment): trimming leading and trailing slashes from input
@rodneyrehm rodneyrehm merged commit 1374ddf into medialize:master Oct 5, 2015
rodneyrehm added a commit that referenced this pull request Oct 5, 2015
@rodneyrehm
Copy link
Member

thank you very much! :)

@rodneyrehm
Copy link
Member

released in v1.17.0

@orlando
Copy link
Contributor Author

orlando commented Nov 13, 2015

🔥

@orlando orlando deleted the od/FIX-236 branch November 13, 2015 13:07
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.

None yet

2 participants