pixelb / crudini

A utility for manipulating ini files
GNU General Public License v2.0
443 stars 63 forks source link

Avoid double blank lines #94

Closed mforkel closed 1 year ago

mforkel commented 1 year ago

When adding a new section to a file that already ends in blank line, another blank line is added before the section. From what I understand, this is a known effect, which is mentioned in a comment in Crudini.set_name_value and caused by python-iniparse.

If it should not be possible to avoid that effect, may be crudini could offer a command to run the function tidy from iniparse's utils.py to clean up the file.