inifile icon indicating copy to clipboard operation
inifile copied to clipboard

added parameter to ignore line backslash line endings as line continuations

Open nickoconnor-appcorp opened this issue 7 years ago • 0 comments

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

nickoconnor-appcorp avatar Aug 16 '17 00:08 nickoconnor-appcorp