We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0862bc6 commit 473fd9dCopy full SHA for 473fd9d
contentctl/output/conf_writer.py
@@ -34,7 +34,10 @@ def escapeNewlines(obj:Any):
34
# Failing to do so will result in an improperly formatted conf files that
35
# cannot be parsed
36
if isinstance(obj,str):
37
- return obj.replace(f"\n"," \\\n")
+ # Remove leading and trailing characters. Conf parsers may erroneously
38
+ # Parse fields if they have leading or trailing newlines/whitespace and we
39
+ # probably don't want that anyway as it doesn't look good in output
40
+ return obj.strip().replace(f"\n"," \\\n")
41
else:
42
return obj
43
0 commit comments