crudini icon indicating copy to clipboard operation
crudini copied to clipboard

Support leading whitespace

Open dmelo opened this issue 8 years ago • 1 comments

Is there a reason not to support leading whitespace? E.g.

[SectionA]
    key1 = value1
    key2 = value2

crudini points parsing errors:

dmelo@merov2:~$ crudini --get a.ini SectionA key1
File contains parsing errors: <???>
    [line  2]:     key1 = value1

    [line  3]:     key2 = value2

dmelo avatar Feb 11 '16 16:02 dmelo

Unfortunately "standard" ini file format treats leading whitespace specially, as it's used to create multiline values, hence the iniparse library that crudini uses is giving an error.

I see indented values used in .gitconfig for example.

Related to this is supporting indented [section headers] as is used in: http://hekad.readthedocs.org/en/latest/getting_started.html#heka-dashboard

We would need to enhance iniparse to support this as an option.

pixelb avatar Feb 12 '16 04:02 pixelb