X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/2429c45a7e3b8e3ef24794b9c982ffcf121acdbd..3ff49a787a8fa5e6a7a7e6e72caf6579ceb2c0a2:/librarian/text.py?ds=inline diff --git a/librarian/text.py b/librarian/text.py index 9a4fd7a..9edfa62 100644 --- a/librarian/text.py +++ b/librarian/text.py @@ -82,7 +82,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, @@ -90,7 +90,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()))