-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Section headers with '.' in them are split #60
Comments
Reading through the |
For what it's worth, I'm working on a PR for this, but it will be a few days or weeks before I submit it. The intended approach is to add a |
It's really very important:
|
What's the status on this? I would also need the functionality to skip the splitting. |
I've hit this bug as well, I would be fine with a way to disable splitting instead of changing the delimiter but as it is right now this is preventing me from using this library but I cant find any other useful ini parser either. |
Just post process the data, I provided a solution here #22 (comment) (can probably be improved but it works. I don't foresee the creators of the package changing it anytime soon they are strictly following the ini specification. |
Carrying on from @rehanvdm's comment, Section Nesting, it would seem every symbol in a URL is bad for this as all of them have been used to infer a hierarchy. Which is sort of true ( So, whilst the soft standard allows for these symbols, having the option to use a nominated symbol for the hierarchical sections or the ability to disable the hierarchical sections seem to be the only 2 options. |
There was a PR that attempted to address this but it had some unanswered questions in it. If folks want to take a run at introducing a new option to set this delimiter, or disable the behavior altogether they are welcome to. As of now folks can escape those strings like > ini.encode({'http:example.net': { dots: true } })
'[http:example\\.net]\ndots=true\n' |
I have the following .ini file:
When parsing this .ini the resulting structure has the section header cut into pieces, I expected
{'https://www.example.com': { settingA: 'foo', settingB: 'bar' } }
, but got{'https://www': { 'example': { 'com': { settingA: 'foo', settingB: 'bar' } } } }
.The text was updated successfully, but these errors were encountered: