X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/e049ee7b22a7acbb5c6a941e6a4c31c9be4bb834..ac7899052e10143e0548ad7de2f67a2c6ca2b50b:/librarian/text.py?ds=sidebyside 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")