ini
ini copied to clipboard
add NoMultiLineSurroundingQuotes option
Describe the pull request
Consider the following multi-line ini file:
value1 = some text here
some more text here 2
Run the following code:
path := "multiline_eof.ini"
f, _ := ini.LoadSources(ini.LoadOptions{
AllowPythonMultilineValues: true,
}, path)
f.Section("").Key("value1").SetValue("some text here\n\tsome more text here 2")
f.SaveTo(path)
Will output:
value1 = """some text here
some more text here 2"""
Now run:
path := "multiline_eof.ini"
f, _ := ini.LoadSources(ini.LoadOptions{
AllowPythonMultilineValues: true,
NoMultiLineSurroundingQuotes: true,
}, path)
f.Section("").Key("value1").SetValue("some text here\n\tsome more text here 2")
f.SaveTo(path)
The output is the same as the original file
value1 = some text here
some more text here 2
Link to the issue: n/a
Checklist
- [*] I agree to follow the Code of Conduct by submitting this pull request.
- [*] I have read and acknowledge the Contributing guide.
- [*] I have added test cases to cover the new code.