You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
prestomation
changed the title
Feature Request: Add an option to preserve whitespace
Feature Request: Add an option to preserve leading whitespace in keys
Mar 18, 2024
But leading white spaces are removed from self.parse_whitespace() before and after each loop. So, Emm...
Those self.parse_whitespace() calls are necessary because the parse need to see what is the next element to be parsed. So it right now requires to see whether the next valid character is either [, =, ;, ...
# This is a line with only commentskey=value # This is a key-value pair, which key has leading whitespaces
[Section] # This is a section, the leading whitespaces should be ignored.
I have what I expect to be a common case where I'm reading a ini file with rust-ini, modifying it, and then writing it back.
This particular application uses some significant white space. See documentation here
There are some particular keys that are expected to be indented. When reading using rust-ini, this indentation is lost.
Here is a unit test snippet that shows the behavior:
This fails like this, notice the missing whitespace before
endpoint_url
The text was updated successfully, but these errors were encountered: