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

"Remove Newlines" filter #47

Merged
merged 5 commits into from
May 27, 2017
Merged

Conversation

djbe
Copy link
Member

@djbe djbe commented May 26, 2017

Fixes #23.

The removal of spaces can be controlled via a boolean parameter, by default (true) it removes spaces.

@djbe djbe added this to the 2.0.0 milestone May 26, 2017
@djbe djbe changed the title Remove newlines filter Remove Newlines filter May 27, 2017
@djbe djbe changed the title Remove Newlines filter "Remove Newlines" filter May 27, 2017
Copy link
Contributor

@AliSoftware AliSoftware left a comment

Choose a reason for hiding this comment

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

OK except indentation

registerFilter("lowerFirstWord", filter: Filters.Strings.lowerFirstWord)
registerFilter("removeNewlines", filter: Filters.Strings.removeNewlines)
registerFilter("snakeToCamelCase", filter: Filters.Strings.snakeToCamelCase)
registerFilter("swiftIdentifier", filter: Filters.Strings.stringToSwiftIdentifier)
Copy link
Contributor

Choose a reason for hiding this comment

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

Use spaces for indentation to be consistent with the rest of the code

let result = string.components(separatedBy: set).joined()

return result
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Use 2-space indentation

@AliSoftware AliSoftware force-pushed the feature/stripnewlinesandspaces branch from 238cac6 to d3d53bc Compare May 27, 2017 17:46
@AliSoftware AliSoftware force-pushed the feature/stripnewlinesandspaces branch from d3d53bc to d3c984b Compare May 27, 2017 17:57
@AliSoftware AliSoftware merged commit 9cdffc6 into master May 27, 2017
@AliSoftware AliSoftware deleted the feature/stripnewlinesandspaces branch May 27, 2017 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants