X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/e049ee7b22a7acbb5c6a941e6a4c31c9be4bb834..9c32ad2925b2d8359eb888c966a2faac8d94307d:/librarian/text.py diff --git a/librarian/text.py b/librarian/text.py index d965a47..0f3c0bb 100644 --- a/librarian/text.py +++ b/librarian/text.py @@ -84,7 +84,7 @@ def transform(wldoc, flags=None, **options): source = "" contributors = "" funders = "" - return OutputFile.from_string((TEMPLATE % { + result = (TEMPLATE % { 'description': description, 'url': url, 'license_description': license_description, @@ -92,7 +92,8 @@ def transform(wldoc, flags=None, **options): 'source': source, 'contributors': contributors, 'funders': funders, - }).encode('utf-8')) + }).encode('utf-8') else: - return OutputFile.from_string(unicode(result).encode('utf-8')) + result = unicode(result).encode('utf-8') + return OutputFile.from_string("\r\n".join(result.splitlines()) + "\r\n")