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 Formatting Logic to PublicFolder.Prefix Setter #122

Closed
scottoffen opened this issue Sep 19, 2016 · 0 comments
Closed

Add Formatting Logic to PublicFolder.Prefix Setter #122

scottoffen opened this issue Sep 19, 2016 · 0 comments
Assignees
Milestone

Comments

@scottoffen
Copy link
Owner

Rather than always pre-pending a '/' to the prefix - which will be problematic if it already starts with a '/' - put logic in the setter to trim white space from the string and remove any leading and trailing slashes before adding a leading slash to the value.

var folder = new PublicFolder();

// Old Behavior
folder.Prefix = "hello"; // Prefix = "hello"

// New Behavior
folder.Prefix = "hello"; // Prefix = "/hello";
folder.Prefix = "/hello"; // Prefix = "/hello";
folder.Prefix = "hello/"; // Prefix = "/hello";
folder.Prefix = "/hello/"; // Prefix = "/hello";
folder.Prefix = "  /hello/  "; // Prefix = "/hello";
@scottoffen scottoffen self-assigned this Sep 19, 2016
scottoffen pushed a commit that referenced this issue Sep 19, 2016
@scottoffen scottoffen added this to the 4.0.0.next milestone Oct 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant