Originally from: https://github.com/cfengine/masterfiles/pull/1598
Without this change, if a line is correct except for whitespace,
the file will still be edited and any changes that triggers will
occur, which is undesirable.
For instance, if the file contains:
And the "desired value" is what is promised, the file will be
It should be noted that the allowability of whitespace in INI
files varies by implementation, as noted in the Wikipedia article:
However, these library bundles already allow arbitrary whitespace
between the index (i.e. the LHS) and the equals sign. I submit
that it is inconsistent to allow spaces between the LHS and the
equals sign and to at the same time NOT allow spaces between the
equals sign and the RHS. In other words, it is my belief that
for any INI file where whitespace to the immediate right of the
equals sign is meaningful, whitespace to the immediate left of the
equals sign is meaningful also.
For example, if the value 'desired value' is promised for the key
'variablename' in section 'sectionname', then without this commit, the
would be changed to:
With this commit, it will instead be changed to:
Which is cosmetically superior.
The change in this commit is not as crucial as the change I made in the
parent commit, but for consistency I believe the field separator regex
passed to the "col" edit_field body should be the same for both calls.