Bugfix: content at the beginning should be added as a line, instead of merged to the rest of the data

This commit is contained in:
Bo Maryniuk 2017-10-30 19:15:42 +01:00
parent b42b762c57
commit 218331c882

View File

@ -1922,7 +1922,7 @@ def line(path, content=None, match=None, mode=None, location=None,
else:
if location == 'start':
body = ''.join([content, body])
body = os.linesep.join([content, body])
elif location == 'end':
body = ''.join([body, _get_line_indent(body[-1], content, indent) if body else content])