Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Section property keys and values are not identified if Section is not immediately followed by key value pairs. #12

Open
wenugopal opened this issue Jul 4, 2012 · 1 comment

Comments

@wenugopal
Copy link

If we have a section with an empty line between [section name] and key-value pairs, section is loaded with empty object instead of key-value pairs.
Example :

[SectionA]

Key1=val1
key2=val2

in the above section, there is an empty line after the SectionA declaration, which is causing the section to be loaded with empty object instead of the actual key-value pairs.

In a typical ini format, we will have spaces, empty lines after the section declaration and before key-value pairs, looks like parser is checking for line.length == 0 and assigning null to section. A fix would be to just return instead of assigning null to section.

Let me know if this not an issue at all.

Thanks,
Venu.

@seangarner
Copy link

#14 fixes this. There's a workaround in there too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants