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(conf) strip/trim specified list values #2206

Merged
merged 1 commit into from Mar 21, 2017
Merged

Conversation

thibaultcha
Copy link
Member

Summary

Properties like:

value = a,  b  , c

...used to yield non-trimed values in the resulting array. We now trim such
values when parsing the config file.

@thibaultcha thibaultcha requested a review from bungle March 16, 2017 00:42
Properties like:

    value = a,  b  , c

...used to yield non-trimed values in the resulting array. We now trim such
values when parsing the config file.
@Tieske
Copy link
Member

Tieske commented Mar 16, 2017

would there be value in stripping leading and trailing commas?

I recall someone created a script to set a value, and had a trailing comma. Edge case...

@thibaultcha
Copy link
Member Author

I am not so sure. Indeed a trailing comma can lead to an empty value (and so can a leading one), but I think that for anyone with coding background, it is clear that this will be the case: split implementations in various languages do produce empty values when their input has leading or trailing tokens... And maybe such a behavior is good to have in some cases, and misconfigured properties are, in the end, what they are: a user error.

Thoughts?

@thibaultcha thibaultcha merged commit b0f9108 into next Mar 21, 2017
@thibaultcha thibaultcha deleted the fix/strip-conf-lists branch March 21, 2017 17:38
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

3 participants