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

Fix 167: Replace multiple slashes with single slash. #175

Merged
merged 2 commits into from
Jun 24, 2015
Merged

Fix 167: Replace multiple slashes with single slash. #175

merged 2 commits into from
Jun 24, 2015

Conversation

delgermurun
Copy link
Contributor

Fix #167

@arunoda arunoda added the doing label Jun 23, 2015
@@ -121,6 +117,12 @@ Router.prototype.path = function(pathDef, fields, queryParams) {
return fields[key] || "";
});

path = path.replace(/\/\/+/g, "/"); // Replace multiple slashes with single slash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, this only look for two '//`. Shall we write a one to deal with any amount of slashes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It handles multiples slashes. I added test.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great.

arunoda added a commit that referenced this pull request Jun 24, 2015
Fix 167: Replace multiple slashes with single slash.
@arunoda arunoda merged commit ef6030f into kadirahq:master Jun 24, 2015
@arunoda arunoda removed the doing label Jun 24, 2015
@delgermurun delgermurun deleted the trailing-slashes branch September 27, 2015 10:16
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