inifile
inifile copied to clipboard
added parameter to ignore line backslash line endings as line continuations
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