PsIni icon indicating copy to clipboard operation
PsIni copied to clipboard

Please allow duplicate keys

Open yuusakuri opened this issue 4 years ago • 2 comments

For example, the php configuration file php.ini allows multiple same keys, such as extension=NAME1, extension=NAME2.

yuusakuri avatar Aug 25 '21 00:08 yuusakuri

I suggest changing the output to something like this:

@(
    @{
        key = value
    }
    'comment line'
    'comment line'
    @{
        key = value
    }
    # ...
)

yuusakuri avatar Aug 25 '21 00:08 yuusakuri

Hmmm currently - it will add the first Key as a normal "key" and then on finding the second "duplicate" key within the same section - it will convert it to being a list of all the same key. So once they are written out, it would bunch them together again. so

   key = value
# 'comment line'
# 'comment line'
   key = value
# 'comment line' 

would end up like this I believe

   
# 'comment line'
# 'comment line'
   key = value
   key = value
# 'comment line' 

PsychoData avatar Sep 10 '21 07:09 PsychoData