MODULES-3624 Allow setting indent character #237
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add new params 'indent_char' and 'indent_width' which allow the character
used for indentation of newly-inserted values to be set instead of just using
a space, and for the width to be specified instead of computed. Some
software requires tabs in ini files, for example.
The default for 'indent_char' is ' ', and the default for 'indent_width' is undefined,
so the default behaviour is unchanged. Changing these params only affects
settings which are actually created. Settings which already exist and have a new value
will not be re-indented.
A limitation of this approach is that it will use whatever you specify
regardless of which characters the existing indentation uses. For example, if you
specify to use a tab and 2 spaces are detected, 2 tabs will be used for a new setting.
That's how it behaves now with spaces, it might just be less obvious when one is
specifying explicitly.