ConfParser.jl
ConfParser.jl copied to clipboard
Case of INI sections is ignored
If an INI file has a section named [General]
, then calling
var = retrieve(conf, "General", "var")
will cause an exception (since the dictionary field of conf
will have "general" as one of the keys).
It would be nice to have case-sensitive sections, but at the very least it shouldn't spit out an error, i.e. it should convert everything to lower case, for example, before trying to find a key in the internal dictionary.
The section names seems to be lowercased yes:
https://github.com/JuliaIO/ConfParser.jl/blob/master/src/ConfParser.jl#L109
It would probably make sense to lowercase the key when retrieving.
Either that or, maybe, just leave it as it is? i.e. substitute the linked line with
blockname = m.captures[1]
I think it would be more standard behavior? Python's configparser does that.