-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Use case
INI files sometimes escape dots in section names using backslash:
[Section\.1]
name = valueIn current SharpConfig, the section name remains "Section\.1" (with the backslash). I'd like it to be interpreted as "Section.1" for lookups and to escape automatically when saving.
Proposal
- Add a new option like:
var options = new ConfigurationOptions { UnescapeSectionNames = true }; var cfg = Configuration.LoadFromFile(path, options);
- Parse: convert
"\."→"." - Serialize: convert
"."→"\."in section headers - Add test cases to verify behavior
Benefits
- Easier to write natural lookups:
var sec = cfg["Section.1"]; // works as expectedLet me know what you think or if there's an existing branch for this feature!
Metadata
Metadata
Assignees
Labels
No labels