summaryrefslogtreecommitdiff
path: root/logilab/common/configuration.py
diff options
context:
space:
mode:
Diffstat (limited to 'logilab/common/configuration.py')
-rw-r--r--logilab/common/configuration.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/logilab/common/configuration.py b/logilab/common/configuration.py
index bdea905..52ac6df 100644
--- a/logilab/common/configuration.py
+++ b/logilab/common/configuration.py
@@ -401,6 +401,9 @@ def ini_format(stream, options, encoding):
print('#%s=' % optname, file=stream)
else:
value = _encode(value, encoding).strip()
+ if optdict.get('type') == 'string' and '\n' in value:
+ prefix = '\n '
+ value = prefix + prefix.join(value.split('\n'))
print('%s=%s' % (optname, value), file=stream)
format_section = ini_format_section