X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/3ff49a787a8fa5e6a7a7e6e72caf6579ceb2c0a2..141733d3db8c11f1eb69a9c0195f07c3c2ed3f8f:/librarian/text.py diff --git a/librarian/text.py b/librarian/text.py index 9edfa62..0f3c0bb 100644 --- a/librarian/text.py +++ b/librarian/text.py @@ -45,6 +45,8 @@ def transform(wldoc, flags=None, **options): if flags: for flag in flags: document.edoc.getroot().set(flag, 'yes') + if 'wrapping' in options: + options['wrapping'] = str(options['wrapping']) result = document.transform(style, **options) @@ -93,5 +95,5 @@ def transform(wldoc, flags=None, **options): }).encode('utf-8') else: result = unicode(result).encode('utf-8') - return OutputFile.from_string("\r\n".join(result.splitlines())) + return OutputFile.from_string("\r\n".join(result.splitlines()) + "\r\n")