Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was 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

@wenugopal

Description

@wenugopal

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions