From 5c5ff9324f2a2c9fec0adc56e3a0d5b4cebcde16 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Mon, 9 Jan 2023 08:31:21 -0800 Subject: [PATCH] update multi-line value behavior --- jc/parsers/ini_dup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jc/parsers/ini_dup.py b/jc/parsers/ini_dup.py index e3ff0008..bd562e63 100644 --- a/jc/parsers/ini_dup.py +++ b/jc/parsers/ini_dup.py @@ -1,7 +1,10 @@ """jc - JSON Convert INI with duplicate key file parser Parses standard INI files and preserves duplicate values. All values are -contained in lists/arrays. Multi-line values are not supported. +contained in lists/arrays. + +If multi-line values are used, each line will be a separate item in the +value list. Blank lines in multi-line values are not supported. - Delimiter can be `=` or `:`. Missing values are supported. - Comment prefix can be `#` or `;`. Comments must be on their own line. @@ -184,9 +187,6 @@ def parse(data, raw=False, quiet=False): if jc.utils.has_data(data): - # clean the data by removing blank lines and stripping leading whitespace - data = '\n'.join([x.lstrip() for x in data.splitlines() if x]) - ini_parser = configparser.ConfigParser( dict_type = MultiDict, allow_no_value=True,