Skip to content

Conversation

@nickoconnor-appcorp
Copy link

Hi,

I have INI files on windows platforms that regularly end with backslashes where values are folder paths - eg:

[general]
Logpath=C:\Temp\path\
Logformat=name_something

This is currently treated as a line continuation, and read into the inifile instance as the value "C:\Temp\pathLogformat=name_something". To get around this i would have to escape the trailing backslash, which breaks my application.

In this PR I've added a new parameter "slash_lc" that accepts true/false and defaults to true (current behaviour). A false value allows my scenario above to work.

Example to use:
IniFile.load 'test/data/line_continuation.ini', :slash_lc => false

Thanks,
nicko

p added a commit to p/o-inifile that referenced this pull request Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant