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

Actually escape whitespace characters instead of quoting the entire string #93

Merged
merged 4 commits into from
Mar 16, 2017

Conversation

ikesyo
Copy link
Member

@ikesyo ikesyo commented Mar 14, 2017

This should be better than #63.

@@ -47,12 +47,14 @@ public struct Task {
}

private extension String {
static let whitespaceRegularExpression = try! NSRegularExpression(pattern: "\\s")
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd make this explicitly private. If the visibility of the extension is changed, we still want this to remain an implementation detail.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @NachoSoto, addressed in 1e977b3.

@mdiep
Copy link
Member

mdiep commented Mar 14, 2017

It doesn't look like we have a test for this. Would you mind adding one?

@ikesyo
Copy link
Member Author

ikesyo commented Mar 16, 2017

I've just added the tests. ✨

@ikesyo ikesyo requested a review from mdiep March 16, 2017 04:32
@mdiep mdiep merged commit 454c204 into master Mar 16, 2017
@mdiep mdiep deleted the modify-escaping-behavior branch March 16, 2017 12:06
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.

3 participants