zonyitoo / rust-ini

INI file parser in Rust
MIT License
305 stars 79 forks source link

Custom formatter #94

Open Odonno opened 2 years ago

Odonno commented 2 years ago

First of, thank you for this library. It really works like a charm.

I used this library to retrieve and store data for a .Xrc file. Kind of like you may have seen a .npmrc with npm. My concern is that the output formatting I expect is a little different than the current output from this lib.

I would like to go from this:

[section]
key=value

To this:

[section]
    key = "value"

Notice the subtle differences:

zonyitoo commented 2 years ago

The space around = is already added by https://github.com/zonyitoo/rust-ini/pull/93 . So we may need an indentation configuration in WriteOption.

I am busy these days, feel free to open a PR if you will. :)